diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 894f50308d26..26ef8042a878 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4787,7 +4787,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230807 + typescript: 5.3.0-dev.20230808 dev: false /duplexer3/0.1.5: @@ -10295,8 +10295,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230807: - resolution: {integrity: sha512-sF8sZl3r/mpAdKAxASaWaoU+mNPF3g8OrZ601HraU2l4WEwAf6nO7sq0Bzl+Y3FV7sWjy+gb6kdM1CtLjVne/g==} + /typescript/5.3.0-dev.20230808: + resolution: {integrity: sha512-skwlatDWwjIHttX+Yg1vH1XRyFJWy8m1LxrP+3VEpAso05fW0y61dQbzqDzdtTjPKUDLf5um7IMwWBS6gVx08A==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -12098,7 +12098,7 @@ packages: dev: false file:projects/arm-azurestackhci.tgz: - resolution: {integrity: sha512-BhMbAnwu55g4xXHK6fUaEmC90ZINsFVrbQSkQ+esavB7pKYipt05PK2SJmiBzKR2mTXeRm+LlmKz/jaEMLFDOg==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-Nv6XJPe6OxflBuzOvdlt0KXJeYmF3eGe1ePBLcJeG+jrKNrxetFb47EumBEM0RUQmJdXb6xMk/QhSeGdaNmqDw==, tarball: file:projects/arm-azurestackhci.tgz} name: '@rush-temp/arm-azurestackhci' version: 0.0.0 dependencies: @@ -12112,7 +12112,8 @@ packages: '@types/node': 14.18.54 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 @@ -20276,7 +20277,7 @@ packages: dev: false file:projects/openai.tgz: - resolution: {integrity: sha512-P2Kt7ieMv/lI2IQF2IYFl/xUaX++zno8QLczqULMhbQpAQ+0i19LZ+pAZR9tnL3BpMS/dyuz3QxIMekW2cyOUA==, tarball: file:projects/openai.tgz} + resolution: {integrity: sha512-N8E0x1oZNJ/0S88emgJ97tMxe0iZmc59ZDKR/eNoY5XEqZumAlO1u4R5KLKOHphDdDt30md1DVa/VY68Ql8x2A==, tarball: file:projects/openai.tgz} name: '@rush-temp/openai' version: 0.0.0 dependencies: @@ -20368,7 +20369,7 @@ packages: dev: false file:projects/perf-ai-form-recognizer.tgz: - resolution: {integrity: sha512-+05JR31WLH5d8FD+GslDQxNHYPLOrvExWUugJJNalgNZpbtoqzQF0837G7tKGDg98VU4XjK6qZA7Gjo2n7O3yg==, tarball: file:projects/perf-ai-form-recognizer.tgz} + resolution: {integrity: sha512-W/M7XPCsmg8eZBzlsl8J6yyEH+1DoeC7F4keU6px84ohKSVn3vZHTYM2xj9e61MzYDWUjormNqquQD9oeB+qEA==, tarball: file:projects/perf-ai-form-recognizer.tgz} name: '@rush-temp/perf-ai-form-recognizer' version: 0.0.0 dependencies: diff --git a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md index bc3a46b396e5..5c2c354d2aa2 100644 --- a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md @@ -1,15 +1,307 @@ # Release History + +## 4.0.0-beta.1 (2023-08-08) + +**Features** -## 3.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group GalleryImagesOperations + - Added operation group GuestAgentOperations + - Added operation group GuestAgents + - Added operation group HybridIdentityMetadataOperations + - Added operation group MarketplaceGalleryImagesOperations + - Added operation group NetworkInterfacesOperations + - Added operation group StorageContainersOperations + - Added operation group VirtualHardDisksOperations + - Added operation group VirtualMachineInstances + - Added operation group VirtualNetworksOperations + - Added Interface ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems + - Added Interface ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable + - Added Interface ExtendedLocation + - Added Interface GalleryDiskImage + - Added Interface GalleryImageIdentifier + - Added Interface GalleryImages + - Added Interface GalleryImagesCreateOrUpdateOptionalParams + - Added Interface GalleryImagesDeleteHeaders + - Added Interface GalleryImagesDeleteOptionalParams + - Added Interface GalleryImagesGetOptionalParams + - Added Interface GalleryImagesListAllNextOptionalParams + - Added Interface GalleryImagesListAllOptionalParams + - Added Interface GalleryImagesListNextOptionalParams + - Added Interface GalleryImagesListOptionalParams + - Added Interface GalleryImagesListResult + - Added Interface GalleryImageStatus + - Added Interface GalleryImageStatusDownloadStatus + - Added Interface GalleryImageStatusProvisioningStatus + - Added Interface GalleryImagesUpdateHeaders + - Added Interface GalleryImagesUpdateOptionalParams + - Added Interface GalleryImagesUpdateRequest + - Added Interface GalleryImageVersion + - Added Interface GalleryImageVersionStorageProfile + - Added Interface GalleryOSDiskImage + - Added Interface GuestAgent + - Added Interface GuestAgentCreateOptionalParams + - Added Interface GuestAgentDeleteHeaders + - Added Interface GuestAgentDeleteOptionalParams + - Added Interface GuestAgentGetOptionalParams + - Added Interface GuestAgentInstallStatus + - Added Interface GuestAgentList + - Added Interface GuestAgentsListNextOptionalParams + - Added Interface GuestAgentsListOptionalParams + - Added Interface GuestCredential + - Added Interface HardwareProfileUpdate + - Added Interface HttpProxyConfiguration + - Added Interface HybridIdentityMetadata + - Added Interface HybridIdentityMetadataGetOptionalParams + - Added Interface HybridIdentityMetadataList + - Added Interface HybridIdentityMetadataListNextOptionalParams + - Added Interface HybridIdentityMetadataListOptionalParams + - Added Interface Identity + - Added Interface InstanceViewStatus + - Added Interface InterfaceDNSSettings + - Added Interface IPConfiguration + - Added Interface IPConfigurationProperties + - Added Interface IPConfigurationPropertiesSubnet + - Added Interface MarketplaceGalleryImages + - Added Interface MarketplaceGalleryImagesCreateOrUpdateOptionalParams + - Added Interface MarketplaceGalleryImagesDeleteHeaders + - Added Interface MarketplaceGalleryImagesDeleteOptionalParams + - Added Interface MarketplaceGalleryImagesGetOptionalParams + - Added Interface MarketplaceGalleryImagesListAllNextOptionalParams + - Added Interface MarketplaceGalleryImagesListAllOptionalParams + - Added Interface MarketplaceGalleryImagesListNextOptionalParams + - Added Interface MarketplaceGalleryImagesListOptionalParams + - Added Interface MarketplaceGalleryImagesListResult + - Added Interface MarketplaceGalleryImageStatus + - Added Interface MarketplaceGalleryImageStatusDownloadStatus + - Added Interface MarketplaceGalleryImageStatusProvisioningStatus + - Added Interface MarketplaceGalleryImagesUpdateHeaders + - Added Interface MarketplaceGalleryImagesUpdateOptionalParams + - Added Interface MarketplaceGalleryImagesUpdateRequest + - Added Interface NetworkInterfaces + - Added Interface NetworkInterfacesCreateOrUpdateOptionalParams + - Added Interface NetworkInterfacesDeleteHeaders + - Added Interface NetworkInterfacesDeleteOptionalParams + - Added Interface NetworkInterfacesGetOptionalParams + - Added Interface NetworkInterfacesListAllNextOptionalParams + - Added Interface NetworkInterfacesListAllOptionalParams + - Added Interface NetworkInterfacesListNextOptionalParams + - Added Interface NetworkInterfacesListOptionalParams + - Added Interface NetworkInterfacesListResult + - Added Interface NetworkInterfaceStatus + - Added Interface NetworkInterfaceStatusProvisioningStatus + - Added Interface NetworkInterfacesUpdateHeaders + - Added Interface NetworkInterfacesUpdateOptionalParams + - Added Interface NetworkInterfacesUpdateRequest + - Added Interface NetworkProfileUpdate + - Added Interface NetworkProfileUpdateNetworkInterfacesItem + - Added Interface OperationsListNextOptionalParams + - Added Interface OsProfileUpdate + - Added Interface OsProfileUpdateLinuxConfiguration + - Added Interface OsProfileUpdateWindowsConfiguration + - Added Interface SshConfiguration + - Added Interface SshPublicKey + - Added Interface StorageContainers + - Added Interface StorageContainersCreateOrUpdateOptionalParams + - Added Interface StorageContainersDeleteHeaders + - Added Interface StorageContainersDeleteOptionalParams + - Added Interface StorageContainersGetOptionalParams + - Added Interface StorageContainersListAllNextOptionalParams + - Added Interface StorageContainersListAllOptionalParams + - Added Interface StorageContainersListNextOptionalParams + - Added Interface StorageContainersListOptionalParams + - Added Interface StorageContainersListResult + - Added Interface StorageContainerStatus + - Added Interface StorageContainerStatusProvisioningStatus + - Added Interface StorageContainersUpdateHeaders + - Added Interface StorageContainersUpdateOptionalParams + - Added Interface StorageContainersUpdateRequest + - Added Interface StorageProfileUpdate + - Added Interface StorageProfileUpdateDataDisksItem + - Added Interface SystemData + - Added Interface VirtualHardDisks + - Added Interface VirtualHardDisksCreateOrUpdateOptionalParams + - Added Interface VirtualHardDisksDeleteHeaders + - Added Interface VirtualHardDisksDeleteOptionalParams + - Added Interface VirtualHardDisksGetOptionalParams + - Added Interface VirtualHardDisksListAllNextOptionalParams + - Added Interface VirtualHardDisksListAllOptionalParams + - Added Interface VirtualHardDisksListNextOptionalParams + - Added Interface VirtualHardDisksListOptionalParams + - Added Interface VirtualHardDisksListResult + - Added Interface VirtualHardDiskStatus + - Added Interface VirtualHardDiskStatusProvisioningStatus + - Added Interface VirtualHardDisksUpdateHeaders + - Added Interface VirtualHardDisksUpdateOptionalParams + - Added Interface VirtualHardDisksUpdateRequest + - Added Interface VirtualMachineInstance + - Added Interface VirtualMachineInstanceListResult + - Added Interface VirtualMachineInstancePropertiesHardwareProfile + - Added Interface VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig + - Added Interface VirtualMachineInstancePropertiesNetworkProfile + - Added Interface VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem + - Added Interface VirtualMachineInstancePropertiesOsProfile + - Added Interface VirtualMachineInstancePropertiesOsProfileLinuxConfiguration + - Added Interface VirtualMachineInstancePropertiesOsProfileWindowsConfiguration + - Added Interface VirtualMachineInstancePropertiesSecurityProfile + - Added Interface VirtualMachineInstancePropertiesSecurityProfileUefiSettings + - Added Interface VirtualMachineInstancePropertiesStorageProfile + - Added Interface VirtualMachineInstancePropertiesStorageProfileDataDisksItem + - Added Interface VirtualMachineInstancePropertiesStorageProfileImageReference + - Added Interface VirtualMachineInstancePropertiesStorageProfileOsDisk + - Added Interface VirtualMachineInstancesCreateOrUpdateOptionalParams + - Added Interface VirtualMachineInstancesDeleteHeaders + - Added Interface VirtualMachineInstancesDeleteOptionalParams + - Added Interface VirtualMachineInstancesGetOptionalParams + - Added Interface VirtualMachineInstancesListNextOptionalParams + - Added Interface VirtualMachineInstancesListOptionalParams + - Added Interface VirtualMachineInstancesRestartHeaders + - Added Interface VirtualMachineInstancesRestartOptionalParams + - Added Interface VirtualMachineInstancesStartHeaders + - Added Interface VirtualMachineInstancesStartOptionalParams + - Added Interface VirtualMachineInstancesStopHeaders + - Added Interface VirtualMachineInstancesStopOptionalParams + - Added Interface VirtualMachineInstanceStatus + - Added Interface VirtualMachineInstanceStatusProvisioningStatus + - Added Interface VirtualMachineInstancesUpdateHeaders + - Added Interface VirtualMachineInstancesUpdateOptionalParams + - Added Interface VirtualMachineInstanceUpdateProperties + - Added Interface VirtualMachineInstanceUpdateRequest + - Added Interface VirtualMachineInstanceView + - Added Interface VirtualMachineVMConfigAgentInstanceView + - Added Interface VirtualNetworkPropertiesDhcpOptions + - Added Interface VirtualNetworkPropertiesSubnetsItem + - Added Interface VirtualNetworkPropertiesSubnetsPropertiesItemsItem + - Added Interface VirtualNetworks + - Added Interface VirtualNetworksCreateOrUpdateOptionalParams + - Added Interface VirtualNetworksDeleteHeaders + - Added Interface VirtualNetworksDeleteOptionalParams + - Added Interface VirtualNetworksGetOptionalParams + - Added Interface VirtualNetworksListAllNextOptionalParams + - Added Interface VirtualNetworksListAllOptionalParams + - Added Interface VirtualNetworksListNextOptionalParams + - Added Interface VirtualNetworksListOptionalParams + - Added Interface VirtualNetworksListResult + - Added Interface VirtualNetworkStatus + - Added Interface VirtualNetworkStatusProvisioningStatus + - Added Interface VirtualNetworksUpdateHeaders + - Added Interface VirtualNetworksUpdateOptionalParams + - Added Interface VirtualNetworksUpdateRequest + - Added Type Alias CloudInitDataSource + - Added Type Alias DiskFileFormat + - Added Type Alias ExtendedLocationTypes + - Added Type Alias GalleryImagesCreateOrUpdateResponse + - Added Type Alias GalleryImagesGetResponse + - Added Type Alias GalleryImagesListAllNextResponse + - Added Type Alias GalleryImagesListAllResponse + - Added Type Alias GalleryImagesListNextResponse + - Added Type Alias GalleryImagesListResponse + - Added Type Alias GalleryImagesUpdateResponse + - Added Type Alias GuestAgentCreateResponse + - Added Type Alias GuestAgentDeleteResponse + - Added Type Alias GuestAgentGetResponse + - Added Type Alias GuestAgentsListNextResponse + - Added Type Alias GuestAgentsListResponse + - Added Type Alias HybridIdentityMetadataGetResponse + - Added Type Alias HybridIdentityMetadataListNextResponse + - Added Type Alias HybridIdentityMetadataListResponse + - Added Type Alias HyperVGeneration + - Added Type Alias IpAllocationMethodEnum + - Added Type Alias MarketplaceGalleryImagesCreateOrUpdateResponse + - Added Type Alias MarketplaceGalleryImagesGetResponse + - Added Type Alias MarketplaceGalleryImagesListAllNextResponse + - Added Type Alias MarketplaceGalleryImagesListAllResponse + - Added Type Alias MarketplaceGalleryImagesListNextResponse + - Added Type Alias MarketplaceGalleryImagesListResponse + - Added Type Alias MarketplaceGalleryImagesUpdateResponse + - Added Type Alias NetworkInterfacesCreateOrUpdateResponse + - Added Type Alias NetworkInterfacesGetResponse + - Added Type Alias NetworkInterfacesListAllNextResponse + - Added Type Alias NetworkInterfacesListAllResponse + - Added Type Alias NetworkInterfacesListNextResponse + - Added Type Alias NetworkInterfacesListResponse + - Added Type Alias NetworkInterfacesUpdateResponse + - Added Type Alias NetworkTypeEnum + - Added Type Alias OperatingSystemTypes + - Added Type Alias OperationsListNextResponse + - Added Type Alias PowerStateEnum + - Added Type Alias ProvisioningAction + - Added Type Alias ProvisioningStateEnum + - Added Type Alias SecurityTypes + - Added Type Alias StatusLevelTypes + - Added Type Alias StatusTypes + - Added Type Alias StorageContainersCreateOrUpdateResponse + - Added Type Alias StorageContainersGetResponse + - Added Type Alias StorageContainersListAllNextResponse + - Added Type Alias StorageContainersListAllResponse + - Added Type Alias StorageContainersListNextResponse + - Added Type Alias StorageContainersListResponse + - Added Type Alias StorageContainersUpdateResponse + - Added Type Alias VirtualHardDisksCreateOrUpdateResponse + - Added Type Alias VirtualHardDisksGetResponse + - Added Type Alias VirtualHardDisksListAllNextResponse + - Added Type Alias VirtualHardDisksListAllResponse + - Added Type Alias VirtualHardDisksListNextResponse + - Added Type Alias VirtualHardDisksListResponse + - Added Type Alias VirtualHardDisksUpdateResponse + - Added Type Alias VirtualMachineInstancesCreateOrUpdateResponse + - Added Type Alias VirtualMachineInstancesDeleteResponse + - Added Type Alias VirtualMachineInstancesGetResponse + - Added Type Alias VirtualMachineInstancesListNextResponse + - Added Type Alias VirtualMachineInstancesListResponse + - Added Type Alias VirtualMachineInstancesRestartResponse + - Added Type Alias VirtualMachineInstancesStartResponse + - Added Type Alias VirtualMachineInstancesStopResponse + - Added Type Alias VirtualMachineInstancesUpdateResponse + - Added Type Alias VirtualNetworksCreateOrUpdateResponse + - Added Type Alias VirtualNetworksGetResponse + - Added Type Alias VirtualNetworksListAllNextResponse + - Added Type Alias VirtualNetworksListAllResponse + - Added Type Alias VirtualNetworksListNextResponse + - Added Type Alias VirtualNetworksListResponse + - Added Type Alias VirtualNetworksUpdateResponse + - Added Type Alias VmSizeEnum + - Interface Resource has a new optional parameter systemData + - Added Enum KnownCloudInitDataSource + - Added Enum KnownDiskFileFormat + - Added Enum KnownExtendedLocationTypes + - Added Enum KnownHyperVGeneration + - Added Enum KnownIpAllocationMethodEnum + - Added Enum KnownNetworkTypeEnum + - Added Enum KnownPowerStateEnum + - Added Enum KnownProvisioningAction + - Added Enum KnownProvisioningStateEnum + - Added Enum KnownSecurityTypes + - Added Enum KnownStatusLevelTypes + - Added Enum KnownStatusTypes + - Added Enum KnownVmSizeEnum + - Enum KnownStatus has a new value Failed + - Enum KnownStatus has a new value InProgress + - Enum KnownStatus has a new value Succeeded -### Other Changes +**Breaking Changes** + - Removed operation group ArcSettings + - Removed operation group Clusters + - Removed operation group Extensions + - Class AzureStackHCIClient has a new signature + - Class AzureStackHCIClient no longer has parameter arcSettings + - Class AzureStackHCIClient no longer has parameter clusters + - Class AzureStackHCIClient no longer has parameter extensions + - Removed Enum KnownArcSettingAggregateState + - Removed Enum KnownDiagnosticLevel + - Removed Enum KnownExtensionAggregateState + - Removed Enum KnownImdsAttestation + - Removed Enum KnownNodeArcState + - Removed Enum KnownNodeExtensionState + - Removed Enum KnownProvisioningState + - Removed Enum KnownWindowsServerSubscription + - Enum KnownStatus no longer has value ConnectedRecently + - Enum KnownStatus no longer has value Disconnected + - Enum KnownStatus no longer has value Error + - Enum KnownStatus no longer has value NotConnectedRecently + - Enum KnownStatus no longer has value NotYetRegistered + + ## 3.1.0 (2022-11-16) **Features** diff --git a/sdk/azurestackhci/arm-azurestackhci/LICENSE b/sdk/azurestackhci/arm-azurestackhci/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/azurestackhci/arm-azurestackhci/LICENSE +++ b/sdk/azurestackhci/arm-azurestackhci/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/azurestackhci/arm-azurestackhci/README.md b/sdk/azurestackhci/arm-azurestackhci/README.md index 8cbc5e791c39..9bf8dc223008 100644 --- a/sdk/azurestackhci/arm-azurestackhci/README.md +++ b/sdk/azurestackhci/arm-azurestackhci/README.md @@ -6,7 +6,7 @@ Azure Stack HCI management service [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestackhci/arm-azurestackhci) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-azurestackhci) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-azurestackhci) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-azurestackhci?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/azurestackhci/arm-azurestackhci/_meta.json b/sdk/azurestackhci/arm-azurestackhci/_meta.json index 2a18bb91ca5c..db91a14d70ab 100644 --- a/sdk/azurestackhci/arm-azurestackhci/_meta.json +++ b/sdk/azurestackhci/arm-azurestackhci/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "38ba3b25d0f4886278b6f916aa667aa2b041181c", "readme": "specification/azurestackhci/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\\azurestackhci\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/azurestackhci/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/azurestackhci/arm-azurestackhci/package.json b/sdk/azurestackhci/arm-azurestackhci/package.json index ab490d1e6753..31a145ad5d6a 100644 --- a/sdk/azurestackhci/arm-azurestackhci/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureStackHCIClient.", - "version": "3.1.1", + "version": "4.0.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@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/azurestackhci/arm-azurestackhci", "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-azurestackhci?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestackhci/arm-azurestackhci" +} \ No newline at end of file diff --git a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md index fe5aa9e1cd83..98cfa95fd0b6 100644 --- a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md +++ b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md @@ -6,450 +6,457 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; -// @public -export interface ArcConnectivityProperties { - enabled?: boolean; -} - -// @public -export interface ArcIdentityResponse { +// @public (undocumented) +export class AzureStackHCIClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureStackHCIClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: AzureStackHCIClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + galleryImagesOperations: GalleryImagesOperations; + // (undocumented) + guestAgentOperations: GuestAgentOperations; + // (undocumented) + guestAgents: GuestAgents; + // (undocumented) + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + // (undocumented) + marketplaceGalleryImagesOperations: MarketplaceGalleryImagesOperations; // (undocumented) - arcApplicationClientId?: string; + networkInterfacesOperations: NetworkInterfacesOperations; // (undocumented) - arcApplicationObjectId?: string; + operations: Operations; + // (undocumented) + storageContainersOperations: StorageContainersOperations; + // (undocumented) + subscriptionId?: string; + // (undocumented) + virtualHardDisksOperations: VirtualHardDisksOperations; // (undocumented) - arcApplicationTenantId?: string; + virtualMachineInstances: VirtualMachineInstances; // (undocumented) - arcServicePrincipalObjectId?: string; + virtualNetworksOperations: VirtualNetworksOperations; } // @public -export interface ArcSetting extends ProxyResource { - readonly aggregateState?: ArcSettingAggregateState; - arcApplicationClientId?: string; - arcApplicationObjectId?: string; - arcApplicationTenantId?: string; - arcInstanceResourceGroup?: string; - arcServicePrincipalObjectId?: string; - connectivityProperties?: Record; - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - readonly perNodeDetails?: PerNodeState[]; - readonly provisioningState?: ProvisioningState; +export interface AzureStackHCIClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; } // @public -export type ArcSettingAggregateState = string; +export type CloudInitDataSource = string; // @public -export interface ArcSettingList { - readonly nextLink?: string; - readonly value?: ArcSetting[]; +export interface ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems { + id?: string; } // @public -export interface ArcSettings { - beginCreateIdentity(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams): Promise, ArcSettingsCreateIdentityResponse>>; - beginCreateIdentityAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams): Promise; - create(resourceGroupName: string, clusterName: string, arcSettingName: string, arcSetting: ArcSetting, options?: ArcSettingsCreateOptionalParams): Promise; - generatePassword(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsGeneratePasswordOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsGetOptionalParams): Promise; - listByCluster(resourceGroupName: string, clusterName: string, options?: ArcSettingsListByClusterOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, arcSettingName: string, arcSetting: ArcSettingsPatch, options?: ArcSettingsUpdateOptionalParams): Promise; +export interface ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable { + id?: string; + name?: string; + routes?: VirtualNetworkPropertiesSubnetsPropertiesItemsItem[]; + type?: string; } // @public -export interface ArcSettingsCreateIdentityOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export type CreatedByType = string; + +// @public +export type DiskFileFormat = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface ExtendedLocation { + name?: string; + type?: ExtendedLocationTypes; } // @public -export type ArcSettingsCreateIdentityResponse = ArcIdentityResponse; +export type ExtendedLocationTypes = string; + +// @public +export interface GalleryDiskImage { + readonly sizeInMB?: number; +} // @public -export interface ArcSettingsCreateOptionalParams extends coreClient.OperationOptions { +export interface GalleryImageIdentifier { + offer: string; + publisher: string; + sku: string; } // @public -export type ArcSettingsCreateResponse = ArcSetting; +export interface GalleryImages extends TrackedResource { + cloudInitDataSource?: CloudInitDataSource; + containerId?: string; + extendedLocation?: ExtendedLocation; + hyperVGeneration?: HyperVGeneration; + identifier?: GalleryImageIdentifier; + imagePath?: string; + osType?: OperatingSystemTypes; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: GalleryImageStatus; + version?: GalleryImageVersion; +} // @public -export interface ArcSettingsDeleteOptionalParams extends coreClient.OperationOptions { +export interface GalleryImagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface ArcSettingsGeneratePasswordOptionalParams extends coreClient.OperationOptions { +export type GalleryImagesCreateOrUpdateResponse = GalleryImages; + +// @public +export interface GalleryImagesDeleteHeaders { + // (undocumented) + location?: string; } // @public -export type ArcSettingsGeneratePasswordResponse = PasswordCredential; +export interface GalleryImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} // @public -export interface ArcSettingsGetOptionalParams extends coreClient.OperationOptions { +export interface GalleryImagesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ArcSettingsGetResponse = ArcSetting; +export type GalleryImagesGetResponse = GalleryImages; // @public -export interface ArcSettingsListByClusterNextOptionalParams extends coreClient.OperationOptions { +export interface GalleryImagesListAllNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ArcSettingsListByClusterNextResponse = ArcSettingList; +export type GalleryImagesListAllNextResponse = GalleryImagesListResult; // @public -export interface ArcSettingsListByClusterOptionalParams extends coreClient.OperationOptions { +export interface GalleryImagesListAllOptionalParams extends coreClient.OperationOptions { } // @public -export type ArcSettingsListByClusterResponse = ArcSettingList; +export type GalleryImagesListAllResponse = GalleryImagesListResult; // @public -export interface ArcSettingsPatch { - connectivityProperties?: Record; - tags?: { - [propertyName: string]: string; - }; +export interface GalleryImagesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface ArcSettingsUpdateOptionalParams extends coreClient.OperationOptions { +export type GalleryImagesListNextResponse = GalleryImagesListResult; + +// @public +export interface GalleryImagesListOptionalParams extends coreClient.OperationOptions { } // @public -export type ArcSettingsUpdateResponse = ArcSetting; +export type GalleryImagesListResponse = GalleryImagesListResult; -// @public (undocumented) -export class AzureStackHCIClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureStackHCIClientOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - arcSettings: ArcSettings; - // (undocumented) - clusters: Clusters; - // (undocumented) - extensions: Extensions; - // (undocumented) - operations: Operations; +// @public +export interface GalleryImagesListResult { + readonly nextLink?: string; // (undocumented) - subscriptionId: string; + value?: GalleryImages[]; } // @public -export interface AzureStackHCIClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; +export interface GalleryImagesOperations { + beginCreateOrUpdate(resourceGroupName: string, galleryImageName: string, galleryImages: GalleryImages, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise, GalleryImagesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryImageName: string, galleryImages: GalleryImages, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryImageName: string, galleryImages: GalleryImagesUpdateRequest, options?: GalleryImagesUpdateOptionalParams): Promise, GalleryImagesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryImageName: string, galleryImages: GalleryImagesUpdateRequest, options?: GalleryImagesUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryImageName: string, options?: GalleryImagesGetOptionalParams): Promise; + list(resourceGroupName: string, options?: GalleryImagesListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: GalleryImagesListAllOptionalParams): PagedAsyncIterableIterator; } // @public -export interface Cluster extends TrackedResource { - aadApplicationObjectId?: string; - aadClientId?: string; - aadServicePrincipalObjectId?: string; - aadTenantId?: string; - readonly billingModel?: string; - readonly cloudId?: string; - cloudManagementEndpoint?: string; - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - desiredProperties?: ClusterDesiredProperties; - readonly lastBillingTimestamp?: Date; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - readonly lastSyncTimestamp?: Date; - readonly provisioningState?: ProvisioningState; - readonly registrationTimestamp?: Date; - readonly reportedProperties?: ClusterReportedProperties; - readonly serviceEndpoint?: string; - readonly status?: Status; - readonly trialDaysRemaining?: number; +export interface GalleryImageStatus { + downloadStatus?: GalleryImageStatusDownloadStatus; + errorCode?: string; + errorMessage?: string; + progressPercentage?: number; + // (undocumented) + provisioningStatus?: GalleryImageStatusProvisioningStatus; } // @public -export interface ClusterDesiredProperties { - diagnosticLevel?: DiagnosticLevel; - windowsServerSubscription?: WindowsServerSubscription; +export interface GalleryImageStatusDownloadStatus { + downloadSizeInMB?: number; } -// @public -export interface ClusterIdentityResponse { - // (undocumented) - aadApplicationObjectId?: string; - // (undocumented) - aadClientId?: string; - // (undocumented) - aadServicePrincipalObjectId?: string; - // (undocumented) - aadTenantId?: string; +// @public (undocumented) +export interface GalleryImageStatusProvisioningStatus { + operationId?: string; + status?: Status; } // @public -export interface ClusterList { - readonly nextLink?: string; - value?: Cluster[]; +export interface GalleryImagesUpdateHeaders { + // (undocumented) + location?: string; } // @public -export interface ClusterNode { - readonly coreCount?: number; - readonly id?: number; - readonly manufacturer?: string; - readonly memoryInGiB?: number; - readonly model?: string; - readonly name?: string; - readonly osName?: string; - readonly osVersion?: string; - readonly serialNumber?: string; - readonly windowsServerSubscription?: WindowsServerSubscription; +export interface GalleryImagesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface ClusterPatch { - aadClientId?: string; - aadTenantId?: string; - cloudManagementEndpoint?: string; - desiredProperties?: ClusterDesiredProperties; +export interface GalleryImagesUpdateRequest { tags?: { [propertyName: string]: string; }; } // @public -export interface ClusterReportedProperties { - readonly clusterId?: string; - readonly clusterName?: string; - readonly clusterVersion?: string; - diagnosticLevel?: DiagnosticLevel; - readonly imdsAttestation?: ImdsAttestation; - readonly lastUpdated?: Date; - readonly nodes?: ClusterNode[]; -} +export type GalleryImagesUpdateResponse = GalleryImages; // @public -export interface Clusters { - beginCreateIdentity(resourceGroupName: string, clusterName: string, options?: ClustersCreateIdentityOptionalParams): Promise, ClustersCreateIdentityResponse>>; - beginCreateIdentityAndWait(resourceGroupName: string, clusterName: string, options?: ClustersCreateIdentityOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginUploadCertificate(resourceGroupName: string, clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams): Promise, void>>; - beginUploadCertificateAndWait(resourceGroupName: string, clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams): Promise; - create(resourceGroupName: string, clusterName: string, cluster: Cluster, options?: ClustersCreateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, cluster: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise; +export interface GalleryImageVersion { + name?: string; + storageProfile?: GalleryImageVersionStorageProfile; } // @public -export interface ClustersCreateIdentityOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface GalleryImageVersionStorageProfile { + osDiskImage?: GalleryOSDiskImage; } // @public -export type ClustersCreateIdentityResponse = ClusterIdentityResponse; +export interface GalleryOSDiskImage extends GalleryDiskImage { +} // @public -export interface ClustersCreateOptionalParams extends coreClient.OperationOptions { -} +export function getContinuationToken(page: unknown): string | undefined; // @public -export type ClustersCreateResponse = Cluster; +export interface GuestAgent extends ProxyResource { + credentials?: GuestCredential; + httpProxyConfig?: HttpProxyConfiguration; + provisioningAction?: ProvisioningAction; + readonly provisioningState?: string; + readonly status?: string; +} // @public -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { +export interface GuestAgentCreateOptionalParams extends coreClient.OperationOptions { + body?: GuestAgent; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface ClustersGetOptionalParams extends coreClient.OperationOptions { -} +export type GuestAgentCreateResponse = GuestAgent; // @public -export type ClustersGetResponse = Cluster; +export interface GuestAgentDeleteHeaders { + // (undocumented) + location?: string; +} // @public -export interface ClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface GuestAgentDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ClustersListByResourceGroupNextResponse = ClusterList; +export type GuestAgentDeleteResponse = GuestAgentDeleteHeaders; // @public -export interface ClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface GuestAgentGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ClustersListByResourceGroupResponse = ClusterList; +export type GuestAgentGetResponse = GuestAgent; // @public -export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface GuestAgentInstallStatus { + readonly agentVersion?: string; + readonly errorDetails?: ErrorDetail[]; + readonly lastStatusChange?: Date; + readonly status?: StatusTypes; + readonly vmUuid?: string; } // @public -export type ClustersListBySubscriptionNextResponse = ClusterList; +export interface GuestAgentList { + nextLink?: string; + value: GuestAgent[]; +} // @public -export interface ClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface GuestAgentOperations { + beginCreate(resourceUri: string, options?: GuestAgentCreateOptionalParams): Promise, GuestAgentCreateResponse>>; + beginCreateAndWait(resourceUri: string, options?: GuestAgentCreateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: GuestAgentDeleteOptionalParams): Promise, GuestAgentDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: GuestAgentDeleteOptionalParams): Promise; + get(resourceUri: string, options?: GuestAgentGetOptionalParams): Promise; } // @public -export type ClustersListBySubscriptionResponse = ClusterList; +export interface GuestAgents { + list(resourceUri: string, options?: GuestAgentsListOptionalParams): PagedAsyncIterableIterator; +} // @public -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { +export interface GuestAgentsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ClustersUpdateResponse = Cluster; +export type GuestAgentsListNextResponse = GuestAgentList; // @public -export interface ClustersUploadCertificateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface GuestAgentsListOptionalParams extends coreClient.OperationOptions { } // @public -export type CreatedByType = string; +export type GuestAgentsListResponse = GuestAgentList; // @public -export type DiagnosticLevel = string; +export interface GuestCredential { + password?: string; + username?: string; +} // @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; +export interface HardwareProfileUpdate { + memoryMB?: number; + processors?: number; + // (undocumented) + vmSize?: VmSizeEnum; } // @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; +export interface HttpProxyConfiguration { + httpsProxy?: string; } // @public -export interface ErrorResponse { - error?: ErrorDetail; +export interface HybridIdentityMetadata extends ProxyResource { + readonly identity?: Identity; + readonly provisioningState?: string; + publicKey?: string; + resourceUid?: string; } // @public -export interface Extension extends ProxyResource { - readonly aggregateState?: ExtensionAggregateState; - autoUpgradeMinorVersion?: boolean; - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - forceUpdateTag?: string; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - readonly perNodeExtensionDetails?: PerNodeExtensionState[]; - protectedSettings?: Record; - readonly provisioningState?: ProvisioningState; - publisher?: string; - settings?: Record; - typeHandlerVersion?: string; - typePropertiesExtensionParametersType?: string; +export interface HybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ExtensionAggregateState = string; +export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; // @public -export interface ExtensionList { - readonly nextLink?: string; - readonly value?: Extension[]; +export interface HybridIdentityMetadataList { + nextLink?: string; + value: HybridIdentityMetadata[]; } // @public -export interface Extensions { - beginCreate(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsCreateOptionalParams): Promise, ExtensionsCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsUpdateOptionalParams): Promise, ExtensionsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsGetOptionalParams): Promise; - listByArcSetting(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ExtensionsListByArcSettingOptionalParams): PagedAsyncIterableIterator; +export interface HybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface ExtensionsCreateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} +export type HybridIdentityMetadataListNextResponse = HybridIdentityMetadataList; // @public -export type ExtensionsCreateResponse = Extension; +export interface HybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions { +} // @public -export interface ExtensionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} +export type HybridIdentityMetadataListResponse = HybridIdentityMetadataList; // @public -export interface ExtensionsGetOptionalParams extends coreClient.OperationOptions { +export interface HybridIdentityMetadataOperations { + get(resourceUri: string, options?: HybridIdentityMetadataGetOptionalParams): Promise; + list(resourceUri: string, options?: HybridIdentityMetadataListOptionalParams): PagedAsyncIterableIterator; } // @public -export type ExtensionsGetResponse = Extension; +export type HyperVGeneration = string; // @public -export interface ExtensionsListByArcSettingNextOptionalParams extends coreClient.OperationOptions { +export interface Identity { + readonly principalId?: string; + readonly tenantId?: string; + type?: "SystemAssigned"; } // @public -export type ExtensionsListByArcSettingNextResponse = ExtensionList; +export interface InstanceViewStatus { + code?: string; + displayStatus?: string; + level?: StatusLevelTypes; + message?: string; + time?: Date; +} -// @public -export interface ExtensionsListByArcSettingOptionalParams extends coreClient.OperationOptions { +// @public (undocumented) +export interface InterfaceDNSSettings { + dnsServers?: string[]; } // @public -export type ExtensionsListByArcSettingResponse = ExtensionList; +export type IpAllocationMethodEnum = string; // @public -export interface ExtensionsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface IPConfiguration { + name?: string; + properties?: IPConfigurationProperties; } // @public -export type ExtensionsUpdateResponse = Extension; - -// @public -export function getContinuationToken(page: unknown): string | undefined; +export interface IPConfigurationProperties { + gateway?: string; + prefixLength?: string; + privateIPAddress?: string; + subnet?: IPConfigurationPropertiesSubnet; +} // @public -export type ImdsAttestation = string; +export interface IPConfigurationPropertiesSubnet { + id?: string; +} // @public export enum KnownActionType { @@ -457,22 +464,9 @@ export enum KnownActionType { } // @public -export enum KnownArcSettingAggregateState { - Canceled = "Canceled", - Connected = "Connected", - Creating = "Creating", - Deleted = "Deleted", - Deleting = "Deleting", - Disconnected = "Disconnected", - Error = "Error", - Failed = "Failed", - InProgress = "InProgress", - Moving = "Moving", - NotSpecified = "NotSpecified", - PartiallyConnected = "PartiallyConnected", - PartiallySucceeded = "PartiallySucceeded", - Succeeded = "Succeeded", - Updating = "Updating" +export enum KnownCloudInitDataSource { + Azure = "Azure", + NoCloud = "NoCloud" } // @public @@ -484,67 +478,39 @@ export enum KnownCreatedByType { } // @public -export enum KnownDiagnosticLevel { - Basic = "Basic", - Enhanced = "Enhanced", - Off = "Off" +export enum KnownDiskFileFormat { + Vhd = "vhd", + Vhdx = "vhdx" } // @public -export enum KnownExtensionAggregateState { - Canceled = "Canceled", - Connected = "Connected", - Creating = "Creating", - Deleted = "Deleted", - Deleting = "Deleting", - Disconnected = "Disconnected", - Error = "Error", - Failed = "Failed", - InProgress = "InProgress", - Moving = "Moving", - NotSpecified = "NotSpecified", - PartiallyConnected = "PartiallyConnected", - PartiallySucceeded = "PartiallySucceeded", - Succeeded = "Succeeded", - Updating = "Updating" +export enum KnownExtendedLocationTypes { + CustomLocation = "CustomLocation" } // @public -export enum KnownImdsAttestation { - Disabled = "Disabled", - Enabled = "Enabled" +export enum KnownHyperVGeneration { + V1 = "V1", + V2 = "V2" } // @public -export enum KnownNodeArcState { - Canceled = "Canceled", - Connected = "Connected", - Creating = "Creating", - Deleted = "Deleted", - Deleting = "Deleting", - Disconnected = "Disconnected", - Error = "Error", - Failed = "Failed", - Moving = "Moving", - NotSpecified = "NotSpecified", - Succeeded = "Succeeded", - Updating = "Updating" +export enum KnownIpAllocationMethodEnum { + Dynamic = "Dynamic", + Static = "Static" } // @public -export enum KnownNodeExtensionState { - Canceled = "Canceled", - Connected = "Connected", - Creating = "Creating", - Deleted = "Deleted", - Deleting = "Deleting", - Disconnected = "Disconnected", - Error = "Error", - Failed = "Failed", - Moving = "Moving", - NotSpecified = "NotSpecified", - Succeeded = "Succeeded", - Updating = "Updating" +export enum KnownNetworkTypeEnum { + ICS = "ICS", + Internal = "Internal", + L2Bridge = "L2Bridge", + L2Tunnel = "L2Tunnel", + Mirrored = "Mirrored", + NAT = "NAT", + Overlay = "Overlay", + Private = "Private", + Transparent = "Transparent" } // @public @@ -555,138 +521,1184 @@ export enum KnownOrigin { } // @public -export enum KnownProvisioningState { +export enum KnownPowerStateEnum { + Deallocated = "Deallocated", + Deallocating = "Deallocating", + Running = "Running", + Starting = "Starting", + Stopped = "Stopped", + Stopping = "Stopping", + Unknown = "Unknown" +} + +// @public +export enum KnownProvisioningAction { + Install = "install", + Repair = "repair", + Uninstall = "uninstall" +} + +// @public +export enum KnownProvisioningStateEnum { Accepted = "Accepted", Canceled = "Canceled", + Deleting = "Deleting", Failed = "Failed", - Provisioning = "Provisioning", + InProgress = "InProgress", Succeeded = "Succeeded" } +// @public +export enum KnownSecurityTypes { + ConfidentialVM = "ConfidentialVM", + TrustedLaunch = "TrustedLaunch" +} + // @public export enum KnownStatus { - ConnectedRecently = "ConnectedRecently", - Disconnected = "Disconnected", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + +// @public +export enum KnownStatusLevelTypes { Error = "Error", - NotConnectedRecently = "NotConnectedRecently", - NotYetRegistered = "NotYetRegistered" + Info = "Info", + Warning = "Warning" } // @public -export enum KnownWindowsServerSubscription { - Disabled = "Disabled", - Enabled = "Enabled" +export enum KnownStatusTypes { + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" } // @public -export type NodeArcState = string; +export enum KnownVmSizeEnum { + Custom = "Custom", + Default = "Default", + StandardA2V2 = "Standard_A2_v2", + StandardA4V2 = "Standard_A4_v2", + StandardD16SV3 = "Standard_D16s_v3", + StandardD2SV3 = "Standard_D2s_v3", + StandardD32SV3 = "Standard_D32s_v3", + StandardD4SV3 = "Standard_D4s_v3", + StandardD8SV3 = "Standard_D8s_v3", + StandardDS13V2 = "Standard_DS13_v2", + StandardDS2V2 = "Standard_DS2_v2", + StandardDS3V2 = "Standard_DS3_v2", + StandardDS4V2 = "Standard_DS4_v2", + StandardDS5V2 = "Standard_DS5_v2", + StandardK8S2V1 = "Standard_K8S2_v1", + StandardK8S3V1 = "Standard_K8S3_v1", + StandardK8S4V1 = "Standard_K8S4_v1", + StandardK8S5V1 = "Standard_K8S5_v1", + StandardK8SV1 = "Standard_K8S_v1", + StandardNK12 = "Standard_NK12", + StandardNK6 = "Standard_NK6", + StandardNV12 = "Standard_NV12", + StandardNV6 = "Standard_NV6" +} + +// @public +export interface MarketplaceGalleryImages extends TrackedResource { + cloudInitDataSource?: CloudInitDataSource; + containerId?: string; + extendedLocation?: ExtendedLocation; + hyperVGeneration?: HyperVGeneration; + identifier?: GalleryImageIdentifier; + osType?: OperatingSystemTypes; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: MarketplaceGalleryImageStatus; + version?: GalleryImageVersion; +} + +// @public +export interface MarketplaceGalleryImagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} // @public -export type NodeExtensionState = string; +export type MarketplaceGalleryImagesCreateOrUpdateResponse = MarketplaceGalleryImages; // @public -export interface Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; +export interface MarketplaceGalleryImagesDeleteHeaders { + // (undocumented) + location?: string; } // @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; +export interface MarketplaceGalleryImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; +export interface MarketplaceGalleryImagesGetOptionalParams extends coreClient.OperationOptions { } // @public -export interface Operations { - list(options?: OperationsListOptionalParams): Promise; -} +export type MarketplaceGalleryImagesGetResponse = MarketplaceGalleryImages; // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface MarketplaceGalleryImagesListAllNextOptionalParams extends coreClient.OperationOptions { } // @public -export type OperationsListResponse = OperationListResult; +export type MarketplaceGalleryImagesListAllNextResponse = MarketplaceGalleryImagesListResult; // @public -export type Origin = string; - -// @public (undocumented) -export interface PasswordCredential { - // (undocumented) - endDateTime?: Date; - // (undocumented) - keyId?: string; - // (undocumented) - secretText?: string; - // (undocumented) - startDateTime?: Date; +export interface MarketplaceGalleryImagesListAllOptionalParams extends coreClient.OperationOptions { } // @public -export interface PerNodeExtensionState { - readonly extension?: string; - readonly name?: string; - readonly state?: NodeExtensionState; -} +export type MarketplaceGalleryImagesListAllResponse = MarketplaceGalleryImagesListResult; // @public -export interface PerNodeState { - readonly arcInstance?: string; - readonly name?: string; - readonly state?: NodeArcState; +export interface MarketplaceGalleryImagesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ProvisioningState = string; +export type MarketplaceGalleryImagesListNextResponse = MarketplaceGalleryImagesListResult; // @public -export interface ProxyResource extends Resource { +export interface MarketplaceGalleryImagesListOptionalParams extends coreClient.OperationOptions { } +// @public +export type MarketplaceGalleryImagesListResponse = MarketplaceGalleryImagesListResult; + // @public (undocumented) -export interface RawCertificateData { +export interface MarketplaceGalleryImagesListResult { // (undocumented) - certificates?: string[]; + nextLink?: string; + // (undocumented) + value?: MarketplaceGalleryImages[]; } // @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly type?: string; +export interface MarketplaceGalleryImagesOperations { + beginCreateOrUpdate(resourceGroupName: string, marketplaceGalleryImageName: string, marketplaceGalleryImages: MarketplaceGalleryImages, options?: MarketplaceGalleryImagesCreateOrUpdateOptionalParams): Promise, MarketplaceGalleryImagesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, marketplaceGalleryImageName: string, marketplaceGalleryImages: MarketplaceGalleryImages, options?: MarketplaceGalleryImagesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, marketplaceGalleryImageName: string, options?: MarketplaceGalleryImagesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, marketplaceGalleryImageName: string, options?: MarketplaceGalleryImagesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, marketplaceGalleryImageName: string, marketplaceGalleryImages: MarketplaceGalleryImagesUpdateRequest, options?: MarketplaceGalleryImagesUpdateOptionalParams): Promise, MarketplaceGalleryImagesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, marketplaceGalleryImageName: string, marketplaceGalleryImages: MarketplaceGalleryImagesUpdateRequest, options?: MarketplaceGalleryImagesUpdateOptionalParams): Promise; + get(resourceGroupName: string, marketplaceGalleryImageName: string, options?: MarketplaceGalleryImagesGetOptionalParams): Promise; + list(resourceGroupName: string, options?: MarketplaceGalleryImagesListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: MarketplaceGalleryImagesListAllOptionalParams): PagedAsyncIterableIterator; } // @public -export type Status = string; +export interface MarketplaceGalleryImageStatus { + downloadStatus?: MarketplaceGalleryImageStatusDownloadStatus; + errorCode?: string; + errorMessage?: string; + progressPercentage?: number; + // (undocumented) + provisioningStatus?: MarketplaceGalleryImageStatusProvisioningStatus; +} // @public -export interface TrackedResource extends Resource { - location: string; - tags?: { - [propertyName: string]: string; - }; +export interface MarketplaceGalleryImageStatusDownloadStatus { + downloadSizeInMB?: number; } // @public (undocumented) -export interface UploadCertificateRequest { +export interface MarketplaceGalleryImageStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface MarketplaceGalleryImagesUpdateHeaders { // (undocumented) - properties?: RawCertificateData; + location?: string; } // @public -export type WindowsServerSubscription = string; +export interface MarketplaceGalleryImagesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MarketplaceGalleryImagesUpdateRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type MarketplaceGalleryImagesUpdateResponse = MarketplaceGalleryImages; + +// @public +export interface NetworkInterfaces extends TrackedResource { + dnsSettings?: InterfaceDNSSettings; + extendedLocation?: ExtendedLocation; + ipConfigurations?: IPConfiguration[]; + macAddress?: string; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: NetworkInterfaceStatus; +} + +// @public +export interface NetworkInterfacesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkInterfacesCreateOrUpdateResponse = NetworkInterfaces; + +// @public +export interface NetworkInterfacesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface NetworkInterfacesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkInterfacesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesGetResponse = NetworkInterfaces; + +// @public +export interface NetworkInterfacesListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesListAllNextResponse = NetworkInterfacesListResult; + +// @public +export interface NetworkInterfacesListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesListAllResponse = NetworkInterfacesListResult; + +// @public +export interface NetworkInterfacesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesListNextResponse = NetworkInterfacesListResult; + +// @public +export interface NetworkInterfacesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesListResponse = NetworkInterfacesListResult; + +// @public (undocumented) +export interface NetworkInterfacesListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: NetworkInterfaces[]; +} + +// @public +export interface NetworkInterfacesOperations { + beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, networkInterfaces: NetworkInterfaces, options?: NetworkInterfacesCreateOrUpdateOptionalParams): Promise, NetworkInterfacesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, networkInterfaceName: string, networkInterfaces: NetworkInterfaces, options?: NetworkInterfacesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, networkInterfaceName: string, networkInterfaces: NetworkInterfacesUpdateRequest, options?: NetworkInterfacesUpdateOptionalParams): Promise, NetworkInterfacesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, networkInterfaceName: string, networkInterfaces: NetworkInterfacesUpdateRequest, options?: NetworkInterfacesUpdateOptionalParams): Promise; + get(resourceGroupName: string, networkInterfaceName: string, options?: NetworkInterfacesGetOptionalParams): Promise; + list(resourceGroupName: string, options?: NetworkInterfacesListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: NetworkInterfacesListAllOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkInterfaceStatus { + errorCode?: string; + errorMessage?: string; + // (undocumented) + provisioningStatus?: NetworkInterfaceStatusProvisioningStatus; +} + +// @public (undocumented) +export interface NetworkInterfaceStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface NetworkInterfacesUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface NetworkInterfacesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkInterfacesUpdateRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type NetworkInterfacesUpdateResponse = NetworkInterfaces; + +// @public +export interface NetworkProfileUpdate { + networkInterfaces?: NetworkProfileUpdateNetworkInterfacesItem[]; +} + +// @public (undocumented) +export interface NetworkProfileUpdateNetworkInterfacesItem { + id?: string; +} + +// @public +export type NetworkTypeEnum = string; + +// @public +export type OperatingSystemTypes = "Windows" | "Linux"; + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export type Origin = string; + +// @public +export interface OsProfileUpdate { + computerName?: string; + // (undocumented) + linuxConfiguration?: OsProfileUpdateLinuxConfiguration; + // (undocumented) + windowsConfiguration?: OsProfileUpdateWindowsConfiguration; +} + +// @public (undocumented) +export interface OsProfileUpdateLinuxConfiguration { + provisionVMAgent?: boolean; + provisionVMConfigAgent?: boolean; +} + +// @public (undocumented) +export interface OsProfileUpdateWindowsConfiguration { + provisionVMAgent?: boolean; + provisionVMConfigAgent?: boolean; +} + +// @public +export type PowerStateEnum = string; + +// @public +export type ProvisioningAction = string; + +// @public +export type ProvisioningStateEnum = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export type SecurityTypes = string; + +// @public +export interface SshConfiguration { + publicKeys?: SshPublicKey[]; +} + +// @public +export interface SshPublicKey { + keyData?: string; + path?: string; +} + +// @public +export type Status = string; + +// @public +export type StatusLevelTypes = string; + +// @public +export type StatusTypes = string; + +// @public +export interface StorageContainers extends TrackedResource { + extendedLocation?: ExtendedLocation; + path?: string; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: StorageContainerStatus; +} + +// @public +export interface StorageContainersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type StorageContainersCreateOrUpdateResponse = StorageContainers; + +// @public +export interface StorageContainersDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface StorageContainersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface StorageContainersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageContainersGetResponse = StorageContainers; + +// @public +export interface StorageContainersListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageContainersListAllNextResponse = StorageContainersListResult; + +// @public +export interface StorageContainersListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageContainersListAllResponse = StorageContainersListResult; + +// @public +export interface StorageContainersListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageContainersListNextResponse = StorageContainersListResult; + +// @public +export interface StorageContainersListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageContainersListResponse = StorageContainersListResult; + +// @public (undocumented) +export interface StorageContainersListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: StorageContainers[]; +} + +// @public +export interface StorageContainersOperations { + beginCreateOrUpdate(resourceGroupName: string, storageContainerName: string, storageContainers: StorageContainers, options?: StorageContainersCreateOrUpdateOptionalParams): Promise, StorageContainersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, storageContainerName: string, storageContainers: StorageContainers, options?: StorageContainersCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, storageContainerName: string, options?: StorageContainersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, storageContainerName: string, options?: StorageContainersDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, storageContainerName: string, storageContainers: StorageContainersUpdateRequest, options?: StorageContainersUpdateOptionalParams): Promise, StorageContainersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, storageContainerName: string, storageContainers: StorageContainersUpdateRequest, options?: StorageContainersUpdateOptionalParams): Promise; + get(resourceGroupName: string, storageContainerName: string, options?: StorageContainersGetOptionalParams): Promise; + list(resourceGroupName: string, options?: StorageContainersListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: StorageContainersListAllOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface StorageContainerStatus { + availableSizeMB?: number; + containerSizeMB?: number; + errorCode?: string; + errorMessage?: string; + // (undocumented) + provisioningStatus?: StorageContainerStatusProvisioningStatus; +} + +// @public (undocumented) +export interface StorageContainerStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface StorageContainersUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface StorageContainersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface StorageContainersUpdateRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type StorageContainersUpdateResponse = StorageContainers; + +// @public (undocumented) +export interface StorageProfileUpdate { + dataDisks?: StorageProfileUpdateDataDisksItem[]; +} + +// @public (undocumented) +export interface StorageProfileUpdateDataDisksItem { + // (undocumented) + id?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface VirtualHardDisks extends TrackedResource { + // (undocumented) + blockSizeBytes?: number; + containerId?: string; + diskFileFormat?: DiskFileFormat; + diskSizeGB?: number; + dynamic?: boolean; + extendedLocation?: ExtendedLocation; + hyperVGeneration?: HyperVGeneration; + // (undocumented) + logicalSectorBytes?: number; + // (undocumented) + physicalSectorBytes?: number; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: VirtualHardDiskStatus; +} + +// @public +export interface VirtualHardDisksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualHardDisksCreateOrUpdateResponse = VirtualHardDisks; + +// @public +export interface VirtualHardDisksDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualHardDisksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualHardDisksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualHardDisksGetResponse = VirtualHardDisks; + +// @public +export interface VirtualHardDisksListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualHardDisksListAllNextResponse = VirtualHardDisksListResult; + +// @public +export interface VirtualHardDisksListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualHardDisksListAllResponse = VirtualHardDisksListResult; + +// @public +export interface VirtualHardDisksListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualHardDisksListNextResponse = VirtualHardDisksListResult; + +// @public +export interface VirtualHardDisksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualHardDisksListResponse = VirtualHardDisksListResult; + +// @public (undocumented) +export interface VirtualHardDisksListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: VirtualHardDisks[]; +} + +// @public +export interface VirtualHardDisksOperations { + beginCreateOrUpdate(resourceGroupName: string, virtualHardDiskName: string, virtualHardDisks: VirtualHardDisks, options?: VirtualHardDisksCreateOrUpdateOptionalParams): Promise, VirtualHardDisksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, virtualHardDiskName: string, virtualHardDisks: VirtualHardDisks, options?: VirtualHardDisksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, virtualHardDiskName: string, options?: VirtualHardDisksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, virtualHardDiskName: string, options?: VirtualHardDisksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, virtualHardDiskName: string, virtualHardDisks: VirtualHardDisksUpdateRequest, options?: VirtualHardDisksUpdateOptionalParams): Promise, VirtualHardDisksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, virtualHardDiskName: string, virtualHardDisks: VirtualHardDisksUpdateRequest, options?: VirtualHardDisksUpdateOptionalParams): Promise; + get(resourceGroupName: string, virtualHardDiskName: string, options?: VirtualHardDisksGetOptionalParams): Promise; + list(resourceGroupName: string, options?: VirtualHardDisksListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: VirtualHardDisksListAllOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualHardDiskStatus { + errorCode?: string; + errorMessage?: string; + // (undocumented) + provisioningStatus?: VirtualHardDiskStatusProvisioningStatus; +} + +// @public (undocumented) +export interface VirtualHardDiskStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface VirtualHardDisksUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualHardDisksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualHardDisksUpdateRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type VirtualHardDisksUpdateResponse = VirtualHardDisks; + +// @public +export interface VirtualMachineInstance extends ProxyResource { + extendedLocation?: ExtendedLocation; + guestAgentInstallStatus?: GuestAgentInstallStatus; + hardwareProfile?: VirtualMachineInstancePropertiesHardwareProfile; + identity?: Identity; + readonly instanceView?: VirtualMachineInstanceView; + networkProfile?: VirtualMachineInstancePropertiesNetworkProfile; + osProfile?: VirtualMachineInstancePropertiesOsProfile; + readonly provisioningState?: ProvisioningStateEnum; + resourceUid?: string; + securityProfile?: VirtualMachineInstancePropertiesSecurityProfile; + readonly status?: VirtualMachineInstanceStatus; + storageProfile?: VirtualMachineInstancePropertiesStorageProfile; + readonly vmId?: string; +} + +// @public (undocumented) +export interface VirtualMachineInstanceListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: VirtualMachineInstance[]; +} + +// @public +export interface VirtualMachineInstancePropertiesHardwareProfile { + // (undocumented) + dynamicMemoryConfig?: VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; + memoryMB?: number; + processors?: number; + // (undocumented) + vmSize?: VmSizeEnum; +} + +// @public (undocumented) +export interface VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig { + // (undocumented) + maximumMemoryMB?: number; + // (undocumented) + minimumMemoryMB?: number; + targetMemoryBuffer?: number; +} + +// @public +export interface VirtualMachineInstancePropertiesNetworkProfile { + networkInterfaces?: VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem[]; +} + +// @public (undocumented) +export interface VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem { + id?: string; +} + +// @public +export interface VirtualMachineInstancePropertiesOsProfile { + adminPassword?: string; + adminUsername?: string; + computerName?: string; + linuxConfiguration?: VirtualMachineInstancePropertiesOsProfileLinuxConfiguration; + windowsConfiguration?: VirtualMachineInstancePropertiesOsProfileWindowsConfiguration; +} + +// @public +export interface VirtualMachineInstancePropertiesOsProfileLinuxConfiguration { + disablePasswordAuthentication?: boolean; + provisionVMAgent?: boolean; + provisionVMConfigAgent?: boolean; + ssh?: SshConfiguration; +} + +// @public +export interface VirtualMachineInstancePropertiesOsProfileWindowsConfiguration { + enableAutomaticUpdates?: boolean; + provisionVMAgent?: boolean; + provisionVMConfigAgent?: boolean; + ssh?: SshConfiguration; + timeZone?: string; +} + +// @public +export interface VirtualMachineInstancePropertiesSecurityProfile { + // (undocumented) + enableTPM?: boolean; + securityType?: SecurityTypes; + // (undocumented) + uefiSettings?: VirtualMachineInstancePropertiesSecurityProfileUefiSettings; +} + +// @public (undocumented) +export interface VirtualMachineInstancePropertiesSecurityProfileUefiSettings { + secureBootEnabled?: boolean; +} + +// @public +export interface VirtualMachineInstancePropertiesStorageProfile { + dataDisks?: VirtualMachineInstancePropertiesStorageProfileDataDisksItem[]; + imageReference?: VirtualMachineInstancePropertiesStorageProfileImageReference; + osDisk?: VirtualMachineInstancePropertiesStorageProfileOsDisk; + vmConfigStoragePathId?: string; +} + +// @public (undocumented) +export interface VirtualMachineInstancePropertiesStorageProfileDataDisksItem { + id?: string; +} + +// @public +export interface VirtualMachineInstancePropertiesStorageProfileImageReference { + id?: string; +} + +// @public +export interface VirtualMachineInstancePropertiesStorageProfileOsDisk { + id?: string; + osType?: OperatingSystemTypes; +} + +// @public +export interface VirtualMachineInstances { + beginCreateOrUpdate(resourceUri: string, virtualMachineInstance: VirtualMachineInstance, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise, VirtualMachineInstancesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceUri: string, virtualMachineInstance: VirtualMachineInstance, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise, VirtualMachineInstancesDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise; + beginRestart(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise, VirtualMachineInstancesRestartResponse>>; + beginRestartAndWait(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise; + beginStart(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise, VirtualMachineInstancesStartResponse>>; + beginStartAndWait(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise; + beginStop(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; + beginStopAndWait(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise; + beginUpdate(resourceUri: string, virtualMachineInstance: VirtualMachineInstanceUpdateRequest, options?: VirtualMachineInstancesUpdateOptionalParams): Promise, VirtualMachineInstancesUpdateResponse>>; + beginUpdateAndWait(resourceUri: string, virtualMachineInstance: VirtualMachineInstanceUpdateRequest, options?: VirtualMachineInstancesUpdateOptionalParams): Promise; + get(resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams): Promise; + list(resourceUri: string, options?: VirtualMachineInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstancesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; + +// @public +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstanceListResult; + +// @public +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineInstancesListResponse = VirtualMachineInstanceListResult; + +// @public +export interface VirtualMachineInstancesRestartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstancesStartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineInstancesStartResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstancesStopHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineInstancesStopResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstanceStatus { + errorCode?: string; + errorMessage?: string; + powerState?: PowerStateEnum; + // (undocumented) + provisioningStatus?: VirtualMachineInstanceStatusProvisioningStatus; +} + +// @public (undocumented) +export interface VirtualMachineInstanceStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface VirtualMachineInstancesUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstanceUpdateProperties { + hardwareProfile?: HardwareProfileUpdate; + networkProfile?: NetworkProfileUpdate; + osProfile?: OsProfileUpdate; + // (undocumented) + storageProfile?: StorageProfileUpdate; +} + +// @public +export interface VirtualMachineInstanceUpdateRequest { + identity?: Identity; + properties?: VirtualMachineInstanceUpdateProperties; +} + +// @public +export interface VirtualMachineInstanceView { + vmAgent?: VirtualMachineVMConfigAgentInstanceView; +} + +// @public +export interface VirtualMachineVMConfigAgentInstanceView { + statuses?: InstanceViewStatus[]; + vmConfigAgentVersion?: string; +} + +// @public +export interface VirtualNetworkPropertiesDhcpOptions { + dnsServers?: string[]; +} + +// @public +export interface VirtualNetworkPropertiesSubnetsItem { + addressPrefix?: string; + addressPrefixes?: string[]; + ipAllocationMethod?: IpAllocationMethodEnum; + ipConfigurationReferences?: ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems[]; + name?: string; + routeTable?: ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable; + vlan?: number; +} + +// @public +export interface VirtualNetworkPropertiesSubnetsPropertiesItemsItem { + addressPrefix?: string; + name?: string; + nextHopIpAddress?: string; +} + +// @public +export interface VirtualNetworks extends TrackedResource { + dhcpOptions?: VirtualNetworkPropertiesDhcpOptions; + extendedLocation?: ExtendedLocation; + networkType?: NetworkTypeEnum; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: VirtualNetworkStatus; + subnets?: VirtualNetworkPropertiesSubnetsItem[]; + vmSwitchName?: string; +} + +// @public +export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualNetworksCreateOrUpdateResponse = VirtualNetworks; + +// @public +export interface VirtualNetworksDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualNetworksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualNetworksGetResponse = VirtualNetworks; + +// @public +export interface VirtualNetworksListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualNetworksListAllNextResponse = VirtualNetworksListResult; + +// @public +export interface VirtualNetworksListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualNetworksListAllResponse = VirtualNetworksListResult; + +// @public +export interface VirtualNetworksListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualNetworksListNextResponse = VirtualNetworksListResult; + +// @public +export interface VirtualNetworksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualNetworksListResponse = VirtualNetworksListResult; + +// @public (undocumented) +export interface VirtualNetworksListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: VirtualNetworks[]; +} + +// @public +export interface VirtualNetworksOperations { + beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetworks, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetworks, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetworksUpdateRequest, options?: VirtualNetworksUpdateOptionalParams): Promise, VirtualNetworksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, virtualNetworks: VirtualNetworksUpdateRequest, options?: VirtualNetworksUpdateOptionalParams): Promise; + // (undocumented) + get(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksGetOptionalParams): Promise; + list(resourceGroupName: string, options?: VirtualNetworksListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: VirtualNetworksListAllOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualNetworkStatus { + errorCode?: string; + errorMessage?: string; + // (undocumented) + provisioningStatus?: VirtualNetworkStatusProvisioningStatus; +} + +// @public (undocumented) +export interface VirtualNetworkStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface VirtualNetworksUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualNetworksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualNetworksUpdateRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type VirtualNetworksUpdateResponse = VirtualNetworks; + +// @public +export type VmSizeEnum = string; // (No @packageDocumentation comment for this package) diff --git a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts index 331390013c19..e4761eae55f9 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts @@ -15,22 +15,36 @@ import { } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { - ArcSettingsImpl, - ClustersImpl, - ExtensionsImpl, - OperationsImpl + GalleryImagesOperationsImpl, + OperationsImpl, + MarketplaceGalleryImagesOperationsImpl, + NetworkInterfacesOperationsImpl, + StorageContainersOperationsImpl, + VirtualHardDisksOperationsImpl, + VirtualMachineInstancesImpl, + HybridIdentityMetadataOperationsImpl, + GuestAgentOperationsImpl, + GuestAgentsImpl, + VirtualNetworksOperationsImpl } from "./operations"; import { - ArcSettings, - Clusters, - Extensions, - Operations + GalleryImagesOperations, + Operations, + MarketplaceGalleryImagesOperations, + NetworkInterfacesOperations, + StorageContainersOperations, + VirtualHardDisksOperations, + VirtualMachineInstances, + HybridIdentityMetadataOperations, + GuestAgentOperations, + GuestAgents, + VirtualNetworksOperations } from "./operationsInterfaces"; import { AzureStackHCIClientOptionalParams } from "./models"; export class AzureStackHCIClient extends coreClient.ServiceClient { $host: string; - subscriptionId: string; + subscriptionId?: string; apiVersion: string; /** @@ -43,12 +57,26 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureStackHCIClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: AzureStackHCIClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: AzureStackHCIClientOptionalParams | string, + options?: AzureStackHCIClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -60,7 +88,7 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-azurestackhci/3.1.1`; + const packageDetails = `azsdk-js-arm-azurestackhci/4.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -113,11 +141,26 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; - this.arcSettings = new ArcSettingsImpl(this); - this.clusters = new ClustersImpl(this); - this.extensions = new ExtensionsImpl(this); + this.apiVersion = options.apiVersion || "2023-07-01-preview"; + this.galleryImagesOperations = new GalleryImagesOperationsImpl(this); this.operations = new OperationsImpl(this); + this.marketplaceGalleryImagesOperations = new MarketplaceGalleryImagesOperationsImpl( + this + ); + this.networkInterfacesOperations = new NetworkInterfacesOperationsImpl( + this + ); + this.storageContainersOperations = new StorageContainersOperationsImpl( + this + ); + this.virtualHardDisksOperations = new VirtualHardDisksOperationsImpl(this); + this.virtualMachineInstances = new VirtualMachineInstancesImpl(this); + this.hybridIdentityMetadataOperations = new HybridIdentityMetadataOperationsImpl( + this + ); + this.guestAgentOperations = new GuestAgentOperationsImpl(this); + this.guestAgents = new GuestAgentsImpl(this); + this.virtualNetworksOperations = new VirtualNetworksOperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -149,8 +192,15 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } - arcSettings: ArcSettings; - clusters: Clusters; - extensions: Extensions; + galleryImagesOperations: GalleryImagesOperations; operations: Operations; + marketplaceGalleryImagesOperations: MarketplaceGalleryImagesOperations; + networkInterfacesOperations: NetworkInterfacesOperations; + storageContainersOperations: StorageContainersOperations; + virtualHardDisksOperations: VirtualHardDisksOperations; + virtualMachineInstances: VirtualMachineInstances; + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + guestAgentOperations: GuestAgentOperations; + guestAgents: GuestAgents; + virtualNetworksOperations: VirtualNetworksOperations; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/lroImpl.ts b/sdk/azurestackhci/arm-azurestackhci/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/lroImpl.ts +++ b/sdk/azurestackhci/arm-azurestackhci/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/azurestackhci/arm-azurestackhci/src/models/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts index c7e519185fc5..c0b8b887972e 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts @@ -8,37 +8,71 @@ import * as coreClient from "@azure/core-client"; -/** List of ArcSetting proxy resources for the HCI cluster. */ -export interface ArcSettingList { - /** - * List of ArcSetting proxy resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ArcSetting[]; - /** - * Link to the next set of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** This is the gallery image definition identifier. */ +export interface GalleryImageIdentifier { + /** The name of the gallery image definition publisher. */ + publisher: string; + /** The name of the gallery image definition offer. */ + offer: string; + /** The name of the gallery image definition SKU. */ + sku: string; } -/** Status of Arc agent for a particular node in HCI Cluster. */ -export interface PerNodeState { - /** - * Name of the Node in HCI Cluster - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Fully qualified resource ID for the Arc agent of this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly arcInstance?: string; +/** Specifies information about the gallery image version that you want to create or update. */ +export interface GalleryImageVersion { + /** This is the version of the gallery image. */ + name?: string; + /** This is the storage profile of a Gallery Image Version. */ + storageProfile?: GalleryImageVersionStorageProfile; +} + +/** This is the storage profile of a Gallery Image Version. */ +export interface GalleryImageVersionStorageProfile { + /** This is the OS disk image. */ + osDiskImage?: GalleryOSDiskImage; +} + +/** This is the disk image base class. */ +export interface GalleryDiskImage { /** - * State of Arc agent in this node. + * This property indicates the size of the VHD to be created. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: NodeArcState; + readonly sizeInMB?: number; +} + +/** The observed state of gallery images */ +export interface GalleryImageStatus { + /** GalleryImage provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + provisioningStatus?: GalleryImageStatusProvisioningStatus; + /** The download status of the gallery image */ + downloadStatus?: GalleryImageStatusDownloadStatus; + /** The progress of the operation in percentage */ + progressPercentage?: number; +} + +export interface GalleryImageStatusProvisioningStatus { + /** The ID of the operation performed on the gallery image */ + operationId?: string; + /** The status of the operation performed on the gallery image [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** The download status of the gallery image */ +export interface GalleryImageStatusDownloadStatus { + /** The downloaded sized of the image in MB */ + downloadSizeInMB?: number; +} + +/** The complex type of the extended location. */ +export interface ExtendedLocation { + /** The name of the extended location. */ + name?: string; + /** The type of the extended location. */ + type?: ExtendedLocationTypes; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ @@ -58,6 +92,27 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ @@ -109,33 +164,15 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** ArcSetting details to update. */ -export interface ArcSettingsPatch { - /** Resource tags. */ +/** The gallery images resource patch definition. */ +export interface GalleryImagesUpdateRequest { + /** Resource tags */ tags?: { [propertyName: string]: string }; - /** contains connectivity related configuration for ARC resources */ - connectivityProperties?: Record; -} - -export interface PasswordCredential { - secretText?: string; - keyId?: string; - startDateTime?: Date; - endDateTime?: Date; -} - -/** ArcIdentity details. */ -export interface ArcIdentityResponse { - arcApplicationClientId?: string; - arcApplicationTenantId?: string; - arcServicePrincipalObjectId?: string; - arcApplicationObjectId?: string; } -/** List of clusters. */ -export interface ClusterList { - /** List of clusters. */ - value?: Cluster[]; +/** List of gallery images. */ +export interface GalleryImagesListResult { + value?: GalleryImages[]; /** * Link to the next set of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -143,414 +180,1061 @@ export interface ClusterList { readonly nextLink?: string; } -/** Desired properties of the cluster. */ -export interface ClusterDesiredProperties { - /** Desired state of Windows Server Subscription. */ - windowsServerSubscription?: WindowsServerSubscription; - /** Desired level of diagnostic data emitted by the cluster. */ - diagnosticLevel?: DiagnosticLevel; -} - -/** Properties reported by cluster agent. */ -export interface ClusterReportedProperties { +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { /** - * Name of the on-prem cluster connected to this resource. + * List of operations supported by the resource provider * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clusterName?: string; + readonly value?: Operation[]; /** - * Unique id generated by the on-prem cluster. + * URL to get the next set of operation list results (if there are any). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clusterId?: string; + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { /** - * Version of the cluster software. + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clusterVersion?: string; + readonly name?: string; /** - * List of nodes reported by the cluster. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodes?: ClusterNode[]; + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; /** - * Last time the cluster reported the data. + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastUpdated?: Date; + readonly origin?: Origin; /** - * IMDS attestation status of the cluster. + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly imdsAttestation?: ImdsAttestation; - /** Level of diagnostic data emitted by the cluster. */ - diagnosticLevel?: DiagnosticLevel; + readonly actionType?: ActionType; } -/** Cluster node details. */ -export interface ClusterNode { +/** Localized display information for this particular operation. */ +export interface OperationDisplay { /** - * Name of the cluster node. + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; /** - * Id of the node in the cluster. + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: number; + readonly operation?: string; /** - * State of Windows Server Subscription. + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly windowsServerSubscription?: WindowsServerSubscription; + readonly description?: string; +} + +/** The observed state of marketplace gallery images */ +export interface MarketplaceGalleryImageStatus { + /** MarketplaceGalleryImage provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + provisioningStatus?: MarketplaceGalleryImageStatusProvisioningStatus; + /** The download status of the gallery image */ + downloadStatus?: MarketplaceGalleryImageStatusDownloadStatus; + /** The progress of the operation in percentage */ + progressPercentage?: number; +} + +export interface MarketplaceGalleryImageStatusProvisioningStatus { + /** The ID of the operation performed on the gallery image */ + operationId?: string; + /** The status of the operation performed on the gallery image [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** The download status of the gallery image */ +export interface MarketplaceGalleryImageStatusDownloadStatus { + /** The downloaded sized of the image in MB */ + downloadSizeInMB?: number; +} + +/** The marketplace gallery image resource patch definition. */ +export interface MarketplaceGalleryImagesUpdateRequest { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface MarketplaceGalleryImagesListResult { + value?: MarketplaceGalleryImages[]; + nextLink?: string; +} + +/** InterfaceIPConfiguration iPConfiguration in a network interface. */ +export interface IPConfiguration { + /** Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** InterfaceIPConfigurationPropertiesFormat properties of IP configuration. */ + properties?: IPConfigurationProperties; +} + +/** InterfaceIPConfigurationPropertiesFormat properties of IP configuration. */ +export interface IPConfigurationProperties { + /** Gateway for network interface */ + gateway?: string; + /** prefixLength for network interface */ + prefixLength?: string; + /** PrivateIPAddress - Private IP address of the IP configuration. */ + privateIPAddress?: string; + /** Subnet - Name of Subnet bound to the IP configuration. */ + subnet?: IPConfigurationPropertiesSubnet; +} + +/** Subnet - Name of Subnet bound to the IP configuration. */ +export interface IPConfigurationPropertiesSubnet { + /** ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... */ + id?: string; +} + +export interface InterfaceDNSSettings { + /** List of DNS server IP Addresses for the interface */ + dnsServers?: string[]; +} + +/** The observed state of network interfaces */ +export interface NetworkInterfaceStatus { + /** NetworkInterface provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + provisioningStatus?: NetworkInterfaceStatusProvisioningStatus; +} + +export interface NetworkInterfaceStatusProvisioningStatus { + /** The ID of the operation performed on the network interface */ + operationId?: string; + /** The status of the operation performed on the network interface [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** The network interface resource patch definition. */ +export interface NetworkInterfacesUpdateRequest { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface NetworkInterfacesListResult { + value?: NetworkInterfaces[]; + nextLink?: string; +} + +/** The observed state of storage containers */ +export interface StorageContainerStatus { + /** StorageContainer provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + /** Amount of space available on the disk in MB */ + availableSizeMB?: number; + /** Total size of the disk in MB */ + containerSizeMB?: number; + provisioningStatus?: StorageContainerStatusProvisioningStatus; +} + +export interface StorageContainerStatusProvisioningStatus { + /** The ID of the operation performed on the storage container */ + operationId?: string; + /** The status of the operation performed on the storage container [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** The storage container resource patch definition. */ +export interface StorageContainersUpdateRequest { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface StorageContainersListResult { + value?: StorageContainers[]; + nextLink?: string; +} + +/** The observed state of virtual hard disks */ +export interface VirtualHardDiskStatus { + /** VirtualHardDisk provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + provisioningStatus?: VirtualHardDiskStatusProvisioningStatus; +} + +export interface VirtualHardDiskStatusProvisioningStatus { + /** The ID of the operation performed on the virtual hard disk */ + operationId?: string; + /** The status of the operation performed on the virtual hard disk [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** The virtual hard disk resource patch definition. */ +export interface VirtualHardDisksUpdateRequest { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface VirtualHardDisksListResult { + value?: VirtualHardDisks[]; + nextLink?: string; +} + +/** HardwareProfile - Specifies the hardware settings for the virtual machine instance. */ +export interface VirtualMachineInstancePropertiesHardwareProfile { + vmSize?: VmSizeEnum; + /** number of processors for the virtual machine instance */ + processors?: number; + /** RAM in MB for the virtual machine instance */ + memoryMB?: number; + dynamicMemoryConfig?: VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; +} + +export interface VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig { + maximumMemoryMB?: number; + minimumMemoryMB?: number; + /** Defines the amount of extra memory that should be reserved for a virtual machine instance at runtime, as a percentage of the total memory that the virtual machine instance is thought to need. This only applies to virtual systems with dynamic memory enabled. This property can be in the range of 5 to 2000. */ + targetMemoryBuffer?: number; +} + +/** NetworkProfile - describes the network configuration the virtual machine instance */ +export interface VirtualMachineInstancePropertiesNetworkProfile { + /** NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance */ + networkInterfaces?: VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem[]; +} + +export interface VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem { + /** ID - Resource Id of the network interface */ + id?: string; +} + +/** OsProfile - describes the configuration of the operating system and sets login data */ +export interface VirtualMachineInstancePropertiesOsProfile { + /** AdminPassword - admin password */ + adminPassword?: string; + /** AdminUsername - admin username */ + adminUsername?: string; + /** ComputerName - name of the compute */ + computerName?: string; + /** LinuxConfiguration - linux specific configuration values for the virtual machine instance */ + linuxConfiguration?: VirtualMachineInstancePropertiesOsProfileLinuxConfiguration; + /** Windows Configuration for the virtual machine instance */ + windowsConfiguration?: VirtualMachineInstancePropertiesOsProfileWindowsConfiguration; +} + +/** LinuxConfiguration - linux specific configuration values for the virtual machine instance */ +export interface VirtualMachineInstancePropertiesOsProfileLinuxConfiguration { + /** DisablePasswordAuthentication - whether password authentication should be disabled */ + disablePasswordAuthentication?: boolean; + /** Specifies the ssh key configuration for a Linux OS. */ + ssh?: SshConfiguration; + /** Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ + provisionVMAgent?: boolean; + /** Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. */ + provisionVMConfigAgent?: boolean; +} + +/** SSH configuration for Linux based VMs running on Azure */ +export interface SshConfiguration { + /** The list of SSH public keys used to authenticate with linux based VMs. */ + publicKeys?: SshPublicKey[]; +} + +/** Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. */ +export interface SshPublicKey { + /** Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys */ + path?: string; + /** SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ + keyData?: string; +} + +/** Windows Configuration for the virtual machine instance */ +export interface VirtualMachineInstancePropertiesOsProfileWindowsConfiguration { + /** Whether to EnableAutomaticUpdates on the machine */ + enableAutomaticUpdates?: boolean; + /** Specifies the ssh key configuration for Windows OS. */ + ssh?: SshConfiguration; + /** TimeZone for the virtual machine instance */ + timeZone?: string; + /** Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ + provisionVMAgent?: boolean; + /** Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. */ + provisionVMConfigAgent?: boolean; +} + +/** SecurityProfile - Specifies the security settings for the virtual machine instance. */ +export interface VirtualMachineInstancePropertiesSecurityProfile { + enableTPM?: boolean; + uefiSettings?: VirtualMachineInstancePropertiesSecurityProfileUefiSettings; + /** Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. */ + securityType?: SecurityTypes; +} + +export interface VirtualMachineInstancePropertiesSecurityProfileUefiSettings { + /** Specifies whether secure boot should be enabled on the virtual machine instance. */ + secureBootEnabled?: boolean; +} + +/** StorageProfile - contains information about the disks and storage information for the virtual machine instance */ +export interface VirtualMachineInstancePropertiesStorageProfile { + /** adds data disks to the virtual machine instance */ + dataDisks?: VirtualMachineInstancePropertiesStorageProfileDataDisksItem[]; + /** Which Image to use for the virtual machine instance */ + imageReference?: VirtualMachineInstancePropertiesStorageProfileImageReference; + /** VHD to attach as OS disk */ + osDisk?: VirtualMachineInstancePropertiesStorageProfileOsDisk; + /** Id of the storage container that hosts the VM configuration file */ + vmConfigStoragePathId?: string; +} + +export interface VirtualMachineInstancePropertiesStorageProfileDataDisksItem { + /** Resource ID of the data disk */ + id?: string; +} + +/** Which Image to use for the virtual machine instance */ +export interface VirtualMachineInstancePropertiesStorageProfileImageReference { + /** Resource ID of the image */ + id?: string; +} + +/** VHD to attach as OS disk */ +export interface VirtualMachineInstancePropertiesStorageProfileOsDisk { + /** Resource ID of the OS disk */ + id?: string; + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** */ + osType?: OperatingSystemTypes; +} + +/** The instance view of a virtual machine. */ +export interface VirtualMachineInstanceView { + /** The VM Config Agent running on the virtual machine. */ + vmAgent?: VirtualMachineVMConfigAgentInstanceView; +} + +/** The instance view of the VM Config Agent running on the virtual machine. */ +export interface VirtualMachineVMConfigAgentInstanceView { + /** The VM Config Agent full version. */ + vmConfigAgentVersion?: string; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; +} + +/** Instance view status. */ +export interface InstanceViewStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: StatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; +} + +/** The observed state of virtual machine instances */ +export interface VirtualMachineInstanceStatus { + /** VirtualMachine provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + /** The power state of the virtual machine instance */ + powerState?: PowerStateEnum; + provisioningStatus?: VirtualMachineInstanceStatusProvisioningStatus; +} + +export interface VirtualMachineInstanceStatusProvisioningStatus { + /** The ID of the operation performed on the virtual machine instance */ + operationId?: string; + /** The status of the operation performed on the virtual machine instance [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** Defines the status of a guest agent installation. */ +export interface GuestAgentInstallStatus { /** - * Manufacturer of the cluster node hardware. + * Specifies the VM's unique SMBIOS ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly manufacturer?: string; + readonly vmUuid?: string; /** - * Model name of the cluster node hardware. + * The installation status of the hybrid machine agent installation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly model?: string; + readonly status?: StatusTypes; /** - * Operating system running on the cluster node. + * The time of the last status change. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly lastStatusChange?: Date; /** - * Version of the operating system running on the cluster node. + * The hybrid machine agent full version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osVersion?: string; + readonly agentVersion?: string; /** - * Immutable id of the cluster node. + * Details about the error state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serialNumber?: string; + readonly errorDetails?: ErrorDetail[]; +} + +/** Identity for the resource. */ +export interface Identity { /** - * Number of physical cores on the cluster node. + * The principal ID of resource identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly coreCount?: number; + readonly principalId?: string; /** - * Total available memory on the cluster node (in GiB). + * The tenant ID of resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly memoryInGiB?: number; + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; } -/** Cluster details to update. */ -export interface ClusterPatch { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Endpoint configured for management from the Azure portal */ - cloudManagementEndpoint?: string; - /** App id of cluster AAD identity. */ - aadClientId?: string; - /** Tenant id of cluster AAD identity. */ - aadTenantId?: string; - /** Desired properties of the cluster. */ - desiredProperties?: ClusterDesiredProperties; +/** The virtual machine instance resource patch definition. */ +export interface VirtualMachineInstanceUpdateRequest { + /** Defines the resource properties for the update. */ + properties?: VirtualMachineInstanceUpdateProperties; + /** Identity for the resource. */ + identity?: Identity; +} + +/** Defines the resource properties for the update. */ +export interface VirtualMachineInstanceUpdateProperties { + /** HardwareProfile - Specifies the hardware settings for the virtual machine instance. */ + hardwareProfile?: HardwareProfileUpdate; + storageProfile?: StorageProfileUpdate; + /** NetworkProfile - describes the network update configuration the virtual machine instance */ + networkProfile?: NetworkProfileUpdate; + /** OsProfile - describes the update configuration of the operating system */ + osProfile?: OsProfileUpdate; +} + +/** HardwareProfile - Specifies the hardware settings for the virtual machine instance. */ +export interface HardwareProfileUpdate { + vmSize?: VmSizeEnum; + /** number of processors for the virtual machine instance */ + processors?: number; + /** RAM in MB for the virtual machine instance */ + memoryMB?: number; +} + +export interface StorageProfileUpdate { + /** adds data disks to the virtual machine instance for the update call */ + dataDisks?: StorageProfileUpdateDataDisksItem[]; +} + +export interface StorageProfileUpdateDataDisksItem { + id?: string; +} + +/** NetworkProfile - describes the network update configuration the virtual machine instance */ +export interface NetworkProfileUpdate { + /** NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance */ + networkInterfaces?: NetworkProfileUpdateNetworkInterfacesItem[]; +} + +export interface NetworkProfileUpdateNetworkInterfacesItem { + /** ID - Resource ID of the network interface */ + id?: string; +} + +/** OsProfile - describes the update configuration of the operating system */ +export interface OsProfileUpdate { + /** ComputerName - name of the computer */ + computerName?: string; + linuxConfiguration?: OsProfileUpdateLinuxConfiguration; + windowsConfiguration?: OsProfileUpdateWindowsConfiguration; +} + +export interface OsProfileUpdateLinuxConfiguration { + /** Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ + provisionVMAgent?: boolean; + /** Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. */ + provisionVMConfigAgent?: boolean; +} + +export interface OsProfileUpdateWindowsConfiguration { + /** Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ + provisionVMAgent?: boolean; + /** Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. */ + provisionVMConfigAgent?: boolean; +} + +export interface VirtualMachineInstanceListResult { + value?: VirtualMachineInstance[]; + nextLink?: string; +} + +/** List of HybridIdentityMetadata. */ +export interface HybridIdentityMetadataList { + /** Url to follow for getting next page of HybridIdentityMetadata. */ + nextLink?: string; + /** Array of HybridIdentityMetadata */ + value: HybridIdentityMetadata[]; +} + +/** Username / Password Credentials to connect to guest. */ +export interface GuestCredential { + /** The username to connect with the guest. */ + username?: string; + /** The password to connect with the guest. */ + password?: string; +} + +/** HTTP Proxy configuration for the VM. */ +export interface HttpProxyConfiguration { + /** The httpsProxy url. */ + httpsProxy?: string; +} + +/** List of GuestAgent. */ +export interface GuestAgentList { + /** Url to follow for getting next page of GuestAgent. */ + nextLink?: string; + /** Array of GuestAgent */ + value: GuestAgent[]; +} + +/** DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. */ +export interface VirtualNetworkPropertiesDhcpOptions { + /** The list of DNS servers IP addresses. */ + dnsServers?: string[]; +} + +/** Subnet subnet in a virtual network resource. */ +export interface VirtualNetworkPropertiesSubnetsItem { + /** Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** Cidr for this subnet - IPv4, IPv6 */ + addressPrefix?: string; + /** AddressPrefixes - List of address prefixes for the subnet. */ + addressPrefixes?: string[]; + /** IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic' */ + ipAllocationMethod?: IpAllocationMethodEnum; + /** IPConfigurationReferences - list of IPConfigurationReferences */ + ipConfigurationReferences?: ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems[]; + /** RouteTable for the subnet */ + routeTable?: ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable; + /** Vlan to use for the subnet */ + vlan?: number; +} + +/** IPConfigurationReference - Describes a IPConfiguration under the virtual network */ +export interface ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems { + /** IPConfigurationID */ + id?: string; +} + +/** RouteTable for the subnet */ +export interface ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable { + /** Etag - Gets a unique read-only string that changes whenever the resource is updated. */ + id?: string; + /** Name - READ-ONLY; Resource name. */ + name?: string; + /** Type - READ-ONLY; Resource type. */ + type?: string; + /** Routes - Collection of routes contained within a route table. */ + routes?: VirtualNetworkPropertiesSubnetsPropertiesItemsItem[]; +} + +/** Route is associated with a subnet. */ +export interface VirtualNetworkPropertiesSubnetsPropertiesItemsItem { + /** Name - name of the subnet */ + name?: string; + /** AddressPrefix - The destination CIDR to which the route applies. */ + addressPrefix?: string; + /** NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. */ + nextHopIpAddress?: string; +} + +/** The observed state of virtual networks */ +export interface VirtualNetworkStatus { + /** VirtualNetwork provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + provisioningStatus?: VirtualNetworkStatusProvisioningStatus; +} + +export interface VirtualNetworkStatusProvisioningStatus { + /** The ID of the operation performed on the virtual network */ + operationId?: string; + /** The status of the operation performed on the virtual network [Succeeded, Failed, InProgress] */ + status?: Status; } -export interface UploadCertificateRequest { - properties?: RawCertificateData; +/** The virtual network resource patch definition. */ +export interface VirtualNetworksUpdateRequest { + /** Resource tags */ + tags?: { [propertyName: string]: string }; } -export interface RawCertificateData { - certificates?: string[]; +export interface VirtualNetworksListResult { + value?: VirtualNetworks[]; + nextLink?: string; } -/** Cluster Identity details. */ -export interface ClusterIdentityResponse { - aadClientId?: string; - aadTenantId?: string; - aadServicePrincipalObjectId?: string; - aadApplicationObjectId?: string; +/** This is the OS disk image. */ +export interface GalleryOSDiskImage extends GalleryDiskImage {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; } -/** List of Extensions in HCI cluster. */ -export interface ExtensionList { +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** The gallery images resource definition. */ +export interface GalleryImages extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** Storage ContainerID of the storage container to be used for gallery image */ + containerId?: string; + /** location of the image the gallery image should be created from */ + imagePath?: string; + /** Operating system type that the gallery image uses [Windows, Linux] */ + osType?: OperatingSystemTypes; + /** Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] */ + cloudInitDataSource?: CloudInitDataSource; + /** The hypervisor generation of the Virtual Machine [V1, V2] */ + hyperVGeneration?: HyperVGeneration; + /** This is the gallery image definition identifier. */ + identifier?: GalleryImageIdentifier; + /** Specifies information about the gallery image version that you want to create or update. */ + version?: GalleryImageVersion; /** - * List of Extensions in HCI cluster. + * Provisioning state of the gallery image. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Extension[]; + readonly provisioningState?: ProvisioningStateEnum; /** - * Link to the next set of results. + * The observed state of gallery images * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: GalleryImageStatus; } -/** Status of Arc Extension for a particular node in HCI Cluster. */ -export interface PerNodeExtensionState { +/** The marketplace gallery image resource definition. */ +export interface MarketplaceGalleryImages extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** Storage ContainerID of the storage container to be used for marketplace gallery image */ + containerId?: string; + /** Operating system type that the gallery image uses [Windows, Linux] */ + osType?: OperatingSystemTypes; + /** Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] */ + cloudInitDataSource?: CloudInitDataSource; + /** The hypervisor generation of the Virtual Machine [V1, V2] */ + hyperVGeneration?: HyperVGeneration; + /** This is the gallery image definition identifier. */ + identifier?: GalleryImageIdentifier; + /** Specifies information about the gallery image version that you want to create or update. */ + version?: GalleryImageVersion; /** - * Name of the node in HCI Cluster. + * Provisioning state of the marketplace gallery image. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** - * Fully qualified resource ID for the particular Arc Extension on this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly extension?: string; + readonly provisioningState?: ProvisioningStateEnum; /** - * State of Arc Extension in this node. + * The observed state of marketplace gallery images * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: NodeExtensionState; + readonly status?: MarketplaceGalleryImageStatus; } -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResult { +/** The network interface resource definition. */ +export interface NetworkInterfaces extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** IPConfigurations - A list of IPConfigurations of the network interface. */ + ipConfigurations?: IPConfiguration[]; + /** MacAddress - The MAC address of the network interface. */ + macAddress?: string; + /** DNS Settings for the interface */ + dnsSettings?: InterfaceDNSSettings; /** - * List of operations supported by the resource provider + * Provisioning state of the network interface. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Operation[]; + readonly provisioningState?: ProvisioningStateEnum; /** - * URL to get the next set of operation list results (if there are any). + * The observed state of network interfaces * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: NetworkInterfaceStatus; } -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { +/** The storage container resource definition. */ +export interface StorageContainers extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** Path of the storage container on the disk */ + path?: string; /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * Provisioning state of the storage container. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly provisioningState?: ProvisioningStateEnum; /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * The observed state of storage containers * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplay; + readonly status?: StorageContainerStatus; +} + +/** The virtual hard disk resource definition. */ +export interface VirtualHardDisks extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + blockSizeBytes?: number; + /** Size of the disk in GB */ + diskSizeGB?: number; + /** Boolean for enabling dynamic sizing on the virtual hard disk */ + dynamic?: boolean; + logicalSectorBytes?: number; + physicalSectorBytes?: number; + /** The hypervisor generation of the Virtual Machine [V1, V2] */ + hyperVGeneration?: HyperVGeneration; + /** The format of the actual VHD file [vhd, vhdx] */ + diskFileFormat?: DiskFileFormat; /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * Provisioning state of the virtual hard disk. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly origin?: Origin; + readonly provisioningState?: ProvisioningStateEnum; + /** Storage ContainerID of the storage container to be used for VHD */ + containerId?: string; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * The observed state of virtual hard disks * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly actionType?: ActionType; + readonly status?: VirtualHardDiskStatus; } -/** Localized display information for this particular operation. */ -export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; +/** The virtual network resource definition. */ +export interface VirtualNetworks extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. */ + dhcpOptions?: VirtualNetworkPropertiesDhcpOptions; + /** Type of the network */ + networkType?: NetworkTypeEnum; + /** Subnet - list of subnets under the virtual network */ + subnets?: VirtualNetworkPropertiesSubnetsItem[]; /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * Provisioning state of the virtual network. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; + readonly provisioningState?: ProvisioningStateEnum; + /** name of the network switch to be used for VMs */ + vmSwitchName?: string; /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * The observed state of virtual networks * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; -} - -/** Connectivity related configuration required by arc server. */ -export interface ArcConnectivityProperties { - /** True indicates ARC connectivity is enabled */ - enabled?: boolean; + readonly status?: VirtualNetworkStatus; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** ArcSetting details. */ -export interface ArcSetting extends ProxyResource { +/** The virtual machine instance resource definition. */ +export interface VirtualMachineInstance extends ProxyResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** Identity for the resource. */ + identity?: Identity; + /** HardwareProfile - Specifies the hardware settings for the virtual machine instance. */ + hardwareProfile?: VirtualMachineInstancePropertiesHardwareProfile; + /** NetworkProfile - describes the network configuration the virtual machine instance */ + networkProfile?: VirtualMachineInstancePropertiesNetworkProfile; + /** OsProfile - describes the configuration of the operating system and sets login data */ + osProfile?: VirtualMachineInstancePropertiesOsProfile; + /** SecurityProfile - Specifies the security settings for the virtual machine instance. */ + securityProfile?: VirtualMachineInstancePropertiesSecurityProfile; + /** StorageProfile - contains information about the disks and storage information for the virtual machine instance */ + storageProfile?: VirtualMachineInstancePropertiesStorageProfile; /** - * Provisioning state of the ArcSetting proxy resource. + * Provisioning state of the virtual machine instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; - /** The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources. */ - arcInstanceResourceGroup?: string; - /** App id of arc AAD identity. */ - arcApplicationClientId?: string; - /** Tenant id of arc AAD identity. */ - arcApplicationTenantId?: string; - /** Object id of arc AAD service principal. */ - arcServicePrincipalObjectId?: string; - /** Object id of arc AAD identity. */ - arcApplicationObjectId?: string; + readonly provisioningState?: ProvisioningStateEnum; /** - * Aggregate state of Arc agent across the nodes in this HCI cluster. + * The virtual machine instance view. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aggregateState?: ArcSettingAggregateState; + readonly instanceView?: VirtualMachineInstanceView; /** - * State of Arc agent in each of the nodes. + * The observed state of virtual machine instances * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly perNodeDetails?: PerNodeState[]; - /** contains connectivity related configuration for ARC resources */ - connectivityProperties?: Record; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** Details of a particular extension in HCI Cluster. */ -export interface Extension extends ProxyResource { - /** - * Provisioning state of the Extension proxy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Aggregate state of Arc Extensions across the nodes in this HCI cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly aggregateState?: ExtensionAggregateState; + readonly status?: VirtualMachineInstanceStatus; + /** Guest agent install status. */ + guestAgentInstallStatus?: GuestAgentInstallStatus; /** - * State of Arc Extension in each of the nodes. + * Unique identifier for the vm resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly perNodeExtensionDetails?: PerNodeExtensionState[]; - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - typePropertiesExtensionParametersType?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** Protected settings (may contain secrets). */ - protectedSettings?: Record; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; + readonly vmId?: string; + /** Unique identifier defined by ARC to identify the guest of the VM. */ + resourceUid?: string; } -/** Cluster details. */ -export interface Cluster extends TrackedResource { - /** - * Provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; +/** Defines the HybridIdentityMetadata. */ +export interface HybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + resourceUid?: string; + /** The Public Key. */ + publicKey?: string; /** - * Status of the cluster agent. + * Identity for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: Status; + readonly identity?: Identity; /** - * Unique, immutable resource id. + * The provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cloudId?: string; - /** Endpoint configured for management from the Azure portal. */ - cloudManagementEndpoint?: string; - /** App id of cluster AAD identity. */ - aadClientId?: string; - /** Tenant id of cluster AAD identity. */ - aadTenantId?: string; - /** Object id of cluster AAD identity. */ - aadApplicationObjectId?: string; - /** Id of cluster identity service principal. */ - aadServicePrincipalObjectId?: string; - /** Desired properties of the cluster. */ - desiredProperties?: ClusterDesiredProperties; - /** - * Properties reported by cluster agent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reportedProperties?: ClusterReportedProperties; - /** - * Number of days remaining in the trial period. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly trialDaysRemaining?: number; - /** - * Type of billing applied to the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingModel?: string; - /** - * First cluster sync timestamp. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly registrationTimestamp?: Date; - /** - * Most recent cluster sync timestamp. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastSyncTimestamp?: Date; + readonly provisioningState?: string; +} + +/** Defines the GuestAgent. */ +export interface GuestAgent extends ProxyResource { + /** Username / Password Credentials to provision guest agent. */ + credentials?: GuestCredential; + /** HTTP Proxy configuration for the VM. */ + httpProxyConfig?: HttpProxyConfiguration; + /** The guest agent provisioning action. */ + provisioningAction?: ProvisioningAction; /** - * Most recent billing meter timestamp. + * The guest agent status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastBillingTimestamp?: Date; + readonly status?: string; /** - * Region specific DataPath Endpoint of the cluster. + * The provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceEndpoint?: string; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; + readonly provisioningState?: string; +} + +/** Defines headers for GalleryImages_delete operation. */ +export interface GalleryImagesDeleteHeaders { + location?: string; +} + +/** Defines headers for GalleryImages_update operation. */ +export interface GalleryImagesUpdateHeaders { + location?: string; +} + +/** Defines headers for MarketplaceGalleryImages_delete operation. */ +export interface MarketplaceGalleryImagesDeleteHeaders { + location?: string; +} + +/** Defines headers for MarketplaceGalleryImages_update operation. */ +export interface MarketplaceGalleryImagesUpdateHeaders { + location?: string; +} + +/** Defines headers for NetworkInterfaces_delete operation. */ +export interface NetworkInterfacesDeleteHeaders { + location?: string; +} + +/** Defines headers for NetworkInterfaces_update operation. */ +export interface NetworkInterfacesUpdateHeaders { + location?: string; +} + +/** Defines headers for StorageContainers_delete operation. */ +export interface StorageContainersDeleteHeaders { + location?: string; +} + +/** Defines headers for StorageContainers_update operation. */ +export interface StorageContainersUpdateHeaders { + location?: string; } +/** Defines headers for VirtualHardDisks_delete operation. */ +export interface VirtualHardDisksDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualHardDisks_update operation. */ +export interface VirtualHardDisksUpdateHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_delete operation. */ +export interface VirtualMachineInstancesDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_update operation. */ +export interface VirtualMachineInstancesUpdateHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_start operation. */ +export interface VirtualMachineInstancesStartHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_stop operation. */ +export interface VirtualMachineInstancesStopHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_restart operation. */ +export interface VirtualMachineInstancesRestartHeaders { + location?: string; +} + +/** Defines headers for GuestAgent_delete operation. */ +export interface GuestAgentDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworks_delete operation. */ +export interface VirtualNetworksDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworks_update operation. */ +export interface VirtualNetworksUpdateHeaders { + location?: string; +} + +/** Known values of {@link CloudInitDataSource} that the service accepts. */ +export enum KnownCloudInitDataSource { + /** NoCloud */ + NoCloud = "NoCloud", + /** Azure */ + Azure = "Azure" +} + +/** + * Defines values for CloudInitDataSource. \ + * {@link KnownCloudInitDataSource} can be used interchangeably with CloudInitDataSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NoCloud** \ + * **Azure** + */ +export type CloudInitDataSource = string; + +/** Known values of {@link HyperVGeneration} that the service accepts. */ +export enum KnownHyperVGeneration { + /** V1 */ + V1 = "V1", + /** V2 */ + V2 = "V2" +} + +/** + * Defines values for HyperVGeneration. \ + * {@link KnownHyperVGeneration} can be used interchangeably with HyperVGeneration, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **V1** \ + * **V2** + */ +export type HyperVGeneration = string; + +/** Known values of {@link ProvisioningStateEnum} that the service accepts. */ +export enum KnownProvisioningStateEnum { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress", + /** Accepted */ + Accepted = "Accepted", + /** Deleting */ + Deleting = "Deleting", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for ProvisioningStateEnum. \ + * {@link KnownProvisioningStateEnum} can be used interchangeably with ProvisioningStateEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **InProgress** \ + * **Accepted** \ + * **Deleting** \ + * **Canceled** + */ +export type ProvisioningStateEnum = string; + +/** Known values of {@link Status} that the service accepts. */ +export enum KnownStatus { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress" +} + +/** + * Defines values for Status. \ + * {@link KnownStatus} can be used interchangeably with Status, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **InProgress** + */ +export type Status = string; + +/** Known values of {@link ExtendedLocationTypes} that the service accepts. */ +export enum KnownExtendedLocationTypes { + /** CustomLocation */ + CustomLocation = "CustomLocation" +} + +/** + * Defines values for ExtendedLocationTypes. \ + * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CustomLocation** + */ +export type ExtendedLocationTypes = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -575,393 +1259,609 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Accepted */ - Accepted = "Accepted", - /** Provisioning */ - Provisioning = "Provisioning" +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" } /** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **Provisioning** + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link DiskFileFormat} that the service accepts. */ +export enum KnownDiskFileFormat { + /** Vhdx */ + Vhdx = "vhdx", + /** Vhd */ + Vhd = "vhd" +} + +/** + * Defines values for DiskFileFormat. \ + * {@link KnownDiskFileFormat} can be used interchangeably with DiskFileFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **vhdx** \ + * **vhd** + */ +export type DiskFileFormat = string; + +/** Known values of {@link VmSizeEnum} that the service accepts. */ +export enum KnownVmSizeEnum { + /** Default */ + Default = "Default", + /** StandardA2V2 */ + StandardA2V2 = "Standard_A2_v2", + /** StandardA4V2 */ + StandardA4V2 = "Standard_A4_v2", + /** StandardD2SV3 */ + StandardD2SV3 = "Standard_D2s_v3", + /** StandardD4SV3 */ + StandardD4SV3 = "Standard_D4s_v3", + /** StandardD8SV3 */ + StandardD8SV3 = "Standard_D8s_v3", + /** StandardD16SV3 */ + StandardD16SV3 = "Standard_D16s_v3", + /** StandardD32SV3 */ + StandardD32SV3 = "Standard_D32s_v3", + /** StandardDS2V2 */ + StandardDS2V2 = "Standard_DS2_v2", + /** StandardDS3V2 */ + StandardDS3V2 = "Standard_DS3_v2", + /** StandardDS4V2 */ + StandardDS4V2 = "Standard_DS4_v2", + /** StandardDS5V2 */ + StandardDS5V2 = "Standard_DS5_v2", + /** StandardDS13V2 */ + StandardDS13V2 = "Standard_DS13_v2", + /** StandardK8SV1 */ + StandardK8SV1 = "Standard_K8S_v1", + /** StandardK8S2V1 */ + StandardK8S2V1 = "Standard_K8S2_v1", + /** StandardK8S3V1 */ + StandardK8S3V1 = "Standard_K8S3_v1", + /** StandardK8S4V1 */ + StandardK8S4V1 = "Standard_K8S4_v1", + /** StandardNK6 */ + StandardNK6 = "Standard_NK6", + /** StandardNK12 */ + StandardNK12 = "Standard_NK12", + /** StandardNV6 */ + StandardNV6 = "Standard_NV6", + /** StandardNV12 */ + StandardNV12 = "Standard_NV12", + /** StandardK8S5V1 */ + StandardK8S5V1 = "Standard_K8S5_v1", + /** Custom */ + Custom = "Custom" +} + +/** + * Defines values for VmSizeEnum. \ + * {@link KnownVmSizeEnum} can be used interchangeably with VmSizeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **Standard_A2_v2** \ + * **Standard_A4_v2** \ + * **Standard_D2s_v3** \ + * **Standard_D4s_v3** \ + * **Standard_D8s_v3** \ + * **Standard_D16s_v3** \ + * **Standard_D32s_v3** \ + * **Standard_DS2_v2** \ + * **Standard_DS3_v2** \ + * **Standard_DS4_v2** \ + * **Standard_DS5_v2** \ + * **Standard_DS13_v2** \ + * **Standard_K8S_v1** \ + * **Standard_K8S2_v1** \ + * **Standard_K8S3_v1** \ + * **Standard_K8S4_v1** \ + * **Standard_NK6** \ + * **Standard_NK12** \ + * **Standard_NV6** \ + * **Standard_NV12** \ + * **Standard_K8S5_v1** \ + * **Custom** */ -export type ProvisioningState = string; +export type VmSizeEnum = string; + +/** Known values of {@link SecurityTypes} that the service accepts. */ +export enum KnownSecurityTypes { + /** TrustedLaunch */ + TrustedLaunch = "TrustedLaunch", + /** ConfidentialVM */ + ConfidentialVM = "ConfidentialVM" +} -/** Known values of {@link ArcSettingAggregateState} that the service accepts. */ -export enum KnownArcSettingAggregateState { - /** NotSpecified */ - NotSpecified = "NotSpecified", +/** + * Defines values for SecurityTypes. \ + * {@link KnownSecurityTypes} can be used interchangeably with SecurityTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TrustedLaunch** \ + * **ConfidentialVM** + */ +export type SecurityTypes = string; + +/** Known values of {@link StatusLevelTypes} that the service accepts. */ +export enum KnownStatusLevelTypes { + /** Info */ + Info = "Info", + /** Warning */ + Warning = "Warning", /** Error */ - Error = "Error", + Error = "Error" +} + +/** + * Defines values for StatusLevelTypes. \ + * {@link KnownStatusLevelTypes} can be used interchangeably with StatusLevelTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Info** \ + * **Warning** \ + * **Error** + */ +export type StatusLevelTypes = string; + +/** Known values of {@link PowerStateEnum} that the service accepts. */ +export enum KnownPowerStateEnum { + /** Deallocated */ + Deallocated = "Deallocated", + /** Deallocating */ + Deallocating = "Deallocating", + /** Running */ + Running = "Running", + /** Starting */ + Starting = "Starting", + /** Stopped */ + Stopped = "Stopped", + /** Stopping */ + Stopping = "Stopping", + /** Unknown */ + Unknown = "Unknown" +} + +/** + * Defines values for PowerStateEnum. \ + * {@link KnownPowerStateEnum} can be used interchangeably with PowerStateEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Deallocated** \ + * **Deallocating** \ + * **Running** \ + * **Starting** \ + * **Stopped** \ + * **Stopping** \ + * **Unknown** + */ +export type PowerStateEnum = string; + +/** Known values of {@link StatusTypes} that the service accepts. */ +export enum KnownStatusTypes { /** Succeeded */ Succeeded = "Succeeded", - /** Canceled */ - Canceled = "Canceled", - /** Failed */ - Failed = "Failed", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Deleted */ - Deleted = "Deleted", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Moving */ - Moving = "Moving", - /** PartiallySucceeded */ - PartiallySucceeded = "PartiallySucceeded", - /** PartiallyConnected */ - PartiallyConnected = "PartiallyConnected", /** InProgress */ - InProgress = "InProgress" + InProgress = "InProgress", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for StatusTypes. \ + * {@link KnownStatusTypes} can be used interchangeably with StatusTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **InProgress** \ + * **Failed** + */ +export type StatusTypes = string; + +/** Known values of {@link ProvisioningAction} that the service accepts. */ +export enum KnownProvisioningAction { + /** Install */ + Install = "install", + /** Uninstall */ + Uninstall = "uninstall", + /** Repair */ + Repair = "repair" +} + +/** + * Defines values for ProvisioningAction. \ + * {@link KnownProvisioningAction} can be used interchangeably with ProvisioningAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **install** \ + * **uninstall** \ + * **repair** + */ +export type ProvisioningAction = string; + +/** Known values of {@link NetworkTypeEnum} that the service accepts. */ +export enum KnownNetworkTypeEnum { + /** NAT */ + NAT = "NAT", + /** Transparent */ + Transparent = "Transparent", + /** L2Bridge */ + L2Bridge = "L2Bridge", + /** L2Tunnel */ + L2Tunnel = "L2Tunnel", + /** ICS */ + ICS = "ICS", + /** Private */ + Private = "Private", + /** Overlay */ + Overlay = "Overlay", + /** Internal */ + Internal = "Internal", + /** Mirrored */ + Mirrored = "Mirrored" +} + +/** + * Defines values for NetworkTypeEnum. \ + * {@link KnownNetworkTypeEnum} can be used interchangeably with NetworkTypeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NAT** \ + * **Transparent** \ + * **L2Bridge** \ + * **L2Tunnel** \ + * **ICS** \ + * **Private** \ + * **Overlay** \ + * **Internal** \ + * **Mirrored** + */ +export type NetworkTypeEnum = string; + +/** Known values of {@link IpAllocationMethodEnum} that the service accepts. */ +export enum KnownIpAllocationMethodEnum { + /** Dynamic */ + Dynamic = "Dynamic", + /** Static */ + Static = "Static" +} + +/** + * Defines values for IpAllocationMethodEnum. \ + * {@link KnownIpAllocationMethodEnum} can be used interchangeably with IpAllocationMethodEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Dynamic** \ + * **Static** + */ +export type IpAllocationMethodEnum = string; +/** Defines values for OperatingSystemTypes. */ +export type OperatingSystemTypes = "Windows" | "Linux"; + +/** Optional parameters. */ +export interface GalleryImagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GalleryImagesGetResponse = GalleryImages; + +/** Optional parameters. */ +export interface GalleryImagesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type GalleryImagesCreateOrUpdateResponse = GalleryImages; + +/** Optional parameters. */ +export interface GalleryImagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface GalleryImagesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type GalleryImagesUpdateResponse = GalleryImages; + +/** Optional parameters. */ +export interface GalleryImagesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GalleryImagesListResponse = GalleryImagesListResult; + +/** Optional parameters. */ +export interface GalleryImagesListAllOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAll operation. */ +export type GalleryImagesListAllResponse = GalleryImagesListResult; + +/** Optional parameters. */ +export interface GalleryImagesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GalleryImagesListNextResponse = GalleryImagesListResult; + +/** Optional parameters. */ +export interface GalleryImagesListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type GalleryImagesListAllNextResponse = GalleryImagesListResult; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MarketplaceGalleryImagesGetResponse = MarketplaceGalleryImages; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type MarketplaceGalleryImagesCreateOrUpdateResponse = MarketplaceGalleryImages; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type MarketplaceGalleryImagesUpdateResponse = MarketplaceGalleryImages; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MarketplaceGalleryImagesListResponse = MarketplaceGalleryImagesListResult; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesListAllOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAll operation. */ +export type MarketplaceGalleryImagesListAllResponse = MarketplaceGalleryImagesListResult; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MarketplaceGalleryImagesListNextResponse = MarketplaceGalleryImagesListResult; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type MarketplaceGalleryImagesListAllNextResponse = MarketplaceGalleryImagesListResult; + +/** Optional parameters. */ +export interface NetworkInterfacesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkInterfacesGetResponse = NetworkInterfaces; + +/** Optional parameters. */ +export interface NetworkInterfacesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type NetworkInterfacesCreateOrUpdateResponse = NetworkInterfaces; + +/** Optional parameters. */ +export interface NetworkInterfacesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkInterfacesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for ArcSettingAggregateState. \ - * {@link KnownArcSettingAggregateState} can be used interchangeably with ArcSettingAggregateState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** \ - * **PartiallySucceeded** \ - * **PartiallyConnected** \ - * **InProgress** - */ -export type ArcSettingAggregateState = string; +/** Contains response data for the update operation. */ +export type NetworkInterfacesUpdateResponse = NetworkInterfaces; -/** Known values of {@link NodeArcState} that the service accepts. */ -export enum KnownNodeArcState { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Error */ - Error = "Error", - /** Succeeded */ - Succeeded = "Succeeded", - /** Canceled */ - Canceled = "Canceled", - /** Failed */ - Failed = "Failed", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Deleted */ - Deleted = "Deleted", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Moving */ - Moving = "Moving" -} +/** Optional parameters. */ +export interface NetworkInterfacesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for NodeArcState. \ - * {@link KnownNodeArcState} can be used interchangeably with NodeArcState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** - */ -export type NodeArcState = string; +/** Contains response data for the list operation. */ +export type NetworkInterfacesListResponse = NetworkInterfacesListResult; -/** Known values of {@link Status} that the service accepts. */ -export enum KnownStatus { - /** NotYetRegistered */ - NotYetRegistered = "NotYetRegistered", - /** ConnectedRecently */ - ConnectedRecently = "ConnectedRecently", - /** NotConnectedRecently */ - NotConnectedRecently = "NotConnectedRecently", - /** Disconnected */ - Disconnected = "Disconnected", - /** Error */ - Error = "Error" -} +/** Optional parameters. */ +export interface NetworkInterfacesListAllOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for Status. \ - * {@link KnownStatus} can be used interchangeably with Status, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotYetRegistered** \ - * **ConnectedRecently** \ - * **NotConnectedRecently** \ - * **Disconnected** \ - * **Error** - */ -export type Status = string; +/** Contains response data for the listAll operation. */ +export type NetworkInterfacesListAllResponse = NetworkInterfacesListResult; -/** Known values of {@link WindowsServerSubscription} that the service accepts. */ -export enum KnownWindowsServerSubscription { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" -} +/** Optional parameters. */ +export interface NetworkInterfacesListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for WindowsServerSubscription. \ - * {@link KnownWindowsServerSubscription} can be used interchangeably with WindowsServerSubscription, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type WindowsServerSubscription = string; +/** Contains response data for the listNext operation. */ +export type NetworkInterfacesListNextResponse = NetworkInterfacesListResult; -/** Known values of {@link DiagnosticLevel} that the service accepts. */ -export enum KnownDiagnosticLevel { - /** Off */ - Off = "Off", - /** Basic */ - Basic = "Basic", - /** Enhanced */ - Enhanced = "Enhanced" -} +/** Optional parameters. */ +export interface NetworkInterfacesListAllNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DiagnosticLevel. \ - * {@link KnownDiagnosticLevel} can be used interchangeably with DiagnosticLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Off** \ - * **Basic** \ - * **Enhanced** - */ -export type DiagnosticLevel = string; +/** Contains response data for the listAllNext operation. */ +export type NetworkInterfacesListAllNextResponse = NetworkInterfacesListResult; -/** Known values of {@link ImdsAttestation} that the service accepts. */ -export enum KnownImdsAttestation { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" -} +/** Optional parameters. */ +export interface StorageContainersGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ImdsAttestation. \ - * {@link KnownImdsAttestation} can be used interchangeably with ImdsAttestation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type ImdsAttestation = string; +/** Contains response data for the get operation. */ +export type StorageContainersGetResponse = StorageContainers; -/** Known values of {@link ExtensionAggregateState} that the service accepts. */ -export enum KnownExtensionAggregateState { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Error */ - Error = "Error", - /** Succeeded */ - Succeeded = "Succeeded", - /** Canceled */ - Canceled = "Canceled", - /** Failed */ - Failed = "Failed", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Deleted */ - Deleted = "Deleted", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Moving */ - Moving = "Moving", - /** PartiallySucceeded */ - PartiallySucceeded = "PartiallySucceeded", - /** PartiallyConnected */ - PartiallyConnected = "PartiallyConnected", - /** InProgress */ - InProgress = "InProgress" +/** Optional parameters. */ +export interface StorageContainersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for ExtensionAggregateState. \ - * {@link KnownExtensionAggregateState} can be used interchangeably with ExtensionAggregateState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** \ - * **PartiallySucceeded** \ - * **PartiallyConnected** \ - * **InProgress** - */ -export type ExtensionAggregateState = string; +/** Contains response data for the createOrUpdate operation. */ +export type StorageContainersCreateOrUpdateResponse = StorageContainers; -/** Known values of {@link NodeExtensionState} that the service accepts. */ -export enum KnownNodeExtensionState { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Error */ - Error = "Error", - /** Succeeded */ - Succeeded = "Succeeded", - /** Canceled */ - Canceled = "Canceled", - /** Failed */ - Failed = "Failed", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Deleted */ - Deleted = "Deleted", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Moving */ - Moving = "Moving" +/** Optional parameters. */ +export interface StorageContainersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for NodeExtensionState. \ - * {@link KnownNodeExtensionState} can be used interchangeably with NodeExtensionState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** - */ -export type NodeExtensionState = string; - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system" +/** Optional parameters. */ +export interface StorageContainersUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; +/** Contains response data for the update operation. */ +export type StorageContainersUpdateResponse = StorageContainers; -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal" -} +/** Optional parameters. */ +export interface StorageContainersListOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; +/** Contains response data for the list operation. */ +export type StorageContainersListResponse = StorageContainersListResult; /** Optional parameters. */ -export interface ArcSettingsListByClusterOptionalParams +export interface StorageContainersListAllOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByCluster operation. */ -export type ArcSettingsListByClusterResponse = ArcSettingList; +/** Contains response data for the listAll operation. */ +export type StorageContainersListAllResponse = StorageContainersListResult; /** Optional parameters. */ -export interface ArcSettingsGetOptionalParams +export interface StorageContainersListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ArcSettingsGetResponse = ArcSetting; +/** Contains response data for the listNext operation. */ +export type StorageContainersListNextResponse = StorageContainersListResult; /** Optional parameters. */ -export interface ArcSettingsCreateOptionalParams +export interface StorageContainersListAllNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the create operation. */ -export type ArcSettingsCreateResponse = ArcSetting; +/** Contains response data for the listAllNext operation. */ +export type StorageContainersListAllNextResponse = StorageContainersListResult; /** Optional parameters. */ -export interface ArcSettingsUpdateOptionalParams +export interface VirtualHardDisksGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ArcSettingsUpdateResponse = ArcSetting; +/** Contains response data for the get operation. */ +export type VirtualHardDisksGetResponse = VirtualHardDisks; /** Optional parameters. */ -export interface ArcSettingsDeleteOptionalParams +export interface VirtualHardDisksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -969,15 +1869,20 @@ export interface ArcSettingsDeleteOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface ArcSettingsGeneratePasswordOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the createOrUpdate operation. */ +export type VirtualHardDisksCreateOrUpdateResponse = VirtualHardDisks; -/** Contains response data for the generatePassword operation. */ -export type ArcSettingsGeneratePasswordResponse = PasswordCredential; +/** Optional parameters. */ +export interface VirtualHardDisksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface ArcSettingsCreateIdentityOptionalParams +export interface VirtualHardDisksUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -985,53 +1890,82 @@ export interface ArcSettingsCreateIdentityOptionalParams resumeFrom?: string; } -/** Contains response data for the createIdentity operation. */ -export type ArcSettingsCreateIdentityResponse = ArcIdentityResponse; +/** Contains response data for the update operation. */ +export type VirtualHardDisksUpdateResponse = VirtualHardDisks; /** Optional parameters. */ -export interface ArcSettingsListByClusterNextOptionalParams +export interface VirtualHardDisksListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByClusterNext operation. */ -export type ArcSettingsListByClusterNextResponse = ArcSettingList; +/** Contains response data for the list operation. */ +export type VirtualHardDisksListResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ClustersListBySubscriptionOptionalParams +export interface VirtualHardDisksListAllOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type ClustersListBySubscriptionResponse = ClusterList; +/** Contains response data for the listAll operation. */ +export type VirtualHardDisksListAllResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupOptionalParams +export interface VirtualHardDisksListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type ClustersListByResourceGroupResponse = ClusterList; +/** Contains response data for the listNext operation. */ +export type VirtualHardDisksListNextResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ClustersGetOptionalParams +export interface VirtualHardDisksListAllNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ClustersGetResponse = Cluster; +/** Contains response data for the listAllNext operation. */ +export type VirtualHardDisksListAllNextResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ClustersCreateOptionalParams +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the create operation. */ -export type ClustersCreateResponse = Cluster; +/** Contains response data for the get operation. */ +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface ClustersUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; + +/** Optional parameters. */ +export interface VirtualMachineInstancesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; + +/** Optional parameters. */ +export interface VirtualMachineInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the update operation. */ -export type ClustersUpdateResponse = Cluster; +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface ClustersDeleteOptionalParams +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1039,8 +1973,11 @@ export interface ClustersDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the start operation. */ +export type VirtualMachineInstancesStartResponse = VirtualMachineInstance; + /** Optional parameters. */ -export interface ClustersUploadCertificateOptionalParams +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1048,8 +1985,11 @@ export interface ClustersUploadCertificateOptionalParams resumeFrom?: string; } +/** Contains response data for the stop operation. */ +export type VirtualMachineInstancesStopResponse = VirtualMachineInstance; + /** Optional parameters. */ -export interface ClustersCreateIdentityOptionalParams +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1057,40 +1997,49 @@ export interface ClustersCreateIdentityOptionalParams resumeFrom?: string; } -/** Contains response data for the createIdentity operation. */ -export type ClustersCreateIdentityResponse = ClusterIdentityResponse; +/** Contains response data for the restart operation. */ +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface ClustersListBySubscriptionNextOptionalParams +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ClustersListBySubscriptionNextResponse = ClusterList; +/** Contains response data for the list operation. */ +export type VirtualMachineInstancesListResponse = VirtualMachineInstanceListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupNextOptionalParams +export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ClustersListByResourceGroupNextResponse = ClusterList; +/** Contains response data for the listNext operation. */ +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstanceListResult; /** Optional parameters. */ -export interface ExtensionsListByArcSettingOptionalParams +export interface HybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByArcSetting operation. */ -export type ExtensionsListByArcSettingResponse = ExtensionList; +/** Contains response data for the get operation. */ +export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; /** Optional parameters. */ -export interface ExtensionsGetOptionalParams +export interface HybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ExtensionsGetResponse = Extension; +/** Contains response data for the list operation. */ +export type HybridIdentityMetadataListResponse = HybridIdentityMetadataList; + +/** Optional parameters. */ +export interface HybridIdentityMetadataListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type HybridIdentityMetadataListNextResponse = HybridIdentityMetadataList; /** Optional parameters. */ -export interface ExtensionsCreateOptionalParams +export interface GuestAgentCreateOptionalParams extends coreClient.OperationOptions { + /** Request payload. */ + body?: GuestAgent; /** 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. */ @@ -1098,10 +2047,17 @@ export interface ExtensionsCreateOptionalParams } /** Contains response data for the create operation. */ -export type ExtensionsCreateResponse = Extension; +export type GuestAgentCreateResponse = GuestAgent; + +/** Optional parameters. */ +export interface GuestAgentGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GuestAgentGetResponse = GuestAgent; /** Optional parameters. */ -export interface ExtensionsUpdateOptionalParams +export interface GuestAgentDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1109,11 +2065,32 @@ export interface ExtensionsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type ExtensionsUpdateResponse = Extension; +/** Contains response data for the delete operation. */ +export type GuestAgentDeleteResponse = GuestAgentDeleteHeaders; + +/** Optional parameters. */ +export interface GuestAgentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GuestAgentsListResponse = GuestAgentList; + +/** Optional parameters. */ +export interface GuestAgentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GuestAgentsListNextResponse = GuestAgentList; + +/** Optional parameters. */ +export interface VirtualNetworksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VirtualNetworksGetResponse = VirtualNetworks; /** Optional parameters. */ -export interface ExtensionsDeleteOptionalParams +export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1121,19 +2098,57 @@ export interface ExtensionsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type VirtualNetworksCreateOrUpdateResponse = VirtualNetworks; + /** Optional parameters. */ -export interface ExtensionsListByArcSettingNextOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualNetworksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualNetworksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByArcSettingNext operation. */ -export type ExtensionsListByArcSettingNextResponse = ExtensionList; +/** Contains response data for the update operation. */ +export type VirtualNetworksUpdateResponse = VirtualNetworks; /** Optional parameters. */ -export interface OperationsListOptionalParams +export interface VirtualNetworksListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; +export type VirtualNetworksListResponse = VirtualNetworksListResult; + +/** Optional parameters. */ +export interface VirtualNetworksListAllOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAll operation. */ +export type VirtualNetworksListAllResponse = VirtualNetworksListResult; + +/** Optional parameters. */ +export interface VirtualNetworksListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VirtualNetworksListNextResponse = VirtualNetworksListResult; + +/** Optional parameters. */ +export interface VirtualNetworksListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type VirtualNetworksListAllNextResponse = VirtualNetworksListResult; /** Optional parameters. */ export interface AzureStackHCIClientOptionalParams diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts index 46e33b41b623..53f5f81e36dd 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts @@ -8,27 +8,28 @@ import * as coreClient from "@azure/core-client"; -export const ArcSettingList: coreClient.CompositeMapper = { +export const GalleryImageIdentifier: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSettingList", + className: "GalleryImageIdentifier", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + publisher: { + serializedName: "publisher", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArcSetting" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + offer: { + serializedName: "offer", + required: true, + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + required: true, type: { name: "String" } @@ -37,28 +38,150 @@ export const ArcSettingList: coreClient.CompositeMapper = { } }; -export const PerNodeState: coreClient.CompositeMapper = { +export const GalleryImageVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PerNodeState", + className: "GalleryImageVersion", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - arcInstance: { - serializedName: "arcInstance", + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "GalleryImageVersionStorageProfile" + } + } + } + } +}; + +export const GalleryImageVersionStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageVersionStorageProfile", + modelProperties: { + osDiskImage: { + serializedName: "osDiskImage", + type: { + name: "Composite", + className: "GalleryOSDiskImage" + } + } + } + } +}; + +export const GalleryDiskImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryDiskImage", + modelProperties: { + sizeInMB: { + serializedName: "sizeInMB", readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const GalleryImageStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - state: { - serializedName: "state", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + provisioningStatus: { + serializedName: "provisioningStatus", + type: { + name: "Composite", + className: "GalleryImageStatusProvisioningStatus" + } + }, + downloadStatus: { + serializedName: "downloadStatus", + type: { + name: "Composite", + className: "GalleryImageStatusDownloadStatus" + } + }, + progressPercentage: { + serializedName: "progressPercentage", + type: { + name: "Number" + } + } + } + } +}; + +export const GalleryImageStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryImageStatusDownloadStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageStatusDownloadStatus", + modelProperties: { + downloadSizeInMB: { + serializedName: "downloadSizeInMB", + type: { + name: "Number" + } + } + } + } +}; + +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", type: { name: "String" } @@ -92,6 +215,58 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -193,10 +368,10 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const ArcSettingsPatch: coreClient.CompositeMapper = { +export const GalleryImagesUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSettingsPatch", + className: "GalleryImagesUpdateRequest", modelProperties: { tags: { serializedName: "tags", @@ -204,76 +379,31 @@ export const ArcSettingsPatch: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "String" } } } - }, - connectivityProperties: { - serializedName: "properties.connectivityProperties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } } } } }; -export const PasswordCredential: coreClient.CompositeMapper = { +export const GalleryImagesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PasswordCredential", + className: "GalleryImagesListResult", modelProperties: { - secretText: { - serializedName: "secretText", - type: { - name: "String" - } - }, - keyId: { - serializedName: "keyId", - type: { - name: "String" - } - }, - startDateTime: { - serializedName: "startDateTime", - type: { - name: "DateTime" - } - }, - endDateTime: { - serializedName: "endDateTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const ArcIdentityResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ArcIdentityResponse", - modelProperties: { - arcApplicationClientId: { - serializedName: "properties.arcApplicationClientId", - type: { - name: "String" - } - }, - arcApplicationTenantId: { - serializedName: "properties.arcApplicationTenantId", - type: { - name: "String" - } - }, - arcServicePrincipalObjectId: { - serializedName: "properties.arcServicePrincipalObjectId", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryImages" + } + } } }, - arcApplicationObjectId: { - serializedName: "properties.arcApplicationObjectId", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -282,19 +412,20 @@ export const ArcIdentityResponse: coreClient.CompositeMapper = { } }; -export const ClusterList: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterList", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Cluster" + className: "Operation" } } } @@ -310,19 +441,42 @@ export const ClusterList: coreClient.CompositeMapper = { } }; -export const ClusterDesiredProperties: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterDesiredProperties", + className: "Operation", modelProperties: { - windowsServerSubscription: { - serializedName: "windowsServerSubscription", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, type: { name: "String" } }, - diagnosticLevel: { - serializedName: "diagnosticLevel", + actionType: { + serializedName: "actionType", + readOnly: true, type: { name: "String" } @@ -331,140 +485,112 @@ export const ClusterDesiredProperties: coreClient.CompositeMapper = { } }; -export const ClusterReportedProperties: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterReportedProperties", + className: "OperationDisplay", modelProperties: { - clusterName: { - serializedName: "clusterName", + provider: { + serializedName: "provider", readOnly: true, type: { name: "String" } }, - clusterId: { - serializedName: "clusterId", + resource: { + serializedName: "resource", readOnly: true, type: { name: "String" } }, - clusterVersion: { - serializedName: "clusterVersion", + operation: { + serializedName: "operation", readOnly: true, type: { name: "String" } }, - nodes: { - serializedName: "nodes", + description: { + serializedName: "description", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterNode" - } - } - } - }, - lastUpdated: { - serializedName: "lastUpdated", - readOnly: true, - type: { - name: "DateTime" - } - }, - imdsAttestation: { - serializedName: "imdsAttestation", - readOnly: true, - type: { - name: "String" - } - }, - diagnosticLevel: { - serializedName: "diagnosticLevel", - type: { - name: "String" + name: "String" } } } } }; -export const ClusterNode: coreClient.CompositeMapper = { +export const MarketplaceGalleryImageStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterNode", + className: "MarketplaceGalleryImageStatus", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "Number" - } - }, - windowsServerSubscription: { - serializedName: "windowsServerSubscription", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - manufacturer: { - serializedName: "manufacturer", - readOnly: true, + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "String" + name: "Composite", + className: "MarketplaceGalleryImageStatusProvisioningStatus" } }, - model: { - serializedName: "model", - readOnly: true, + downloadStatus: { + serializedName: "downloadStatus", type: { - name: "String" + name: "Composite", + className: "MarketplaceGalleryImageStatusDownloadStatus" } }, - osName: { - serializedName: "osName", - readOnly: true, + progressPercentage: { + serializedName: "progressPercentage", type: { - name: "String" + name: "Number" } - }, - osVersion: { - serializedName: "osVersion", - readOnly: true, + } + } + } +}; + +export const MarketplaceGalleryImageStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceGalleryImageStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", type: { name: "String" } }, - serialNumber: { - serializedName: "serialNumber", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } - }, - coreCount: { - serializedName: "coreCount", - readOnly: true, - type: { - name: "Number" - } - }, - memoryInGiB: { - serializedName: "memoryInGiB", - readOnly: true, + } + } + } +}; + +export const MarketplaceGalleryImageStatusDownloadStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceGalleryImageStatusDownloadStatus", + modelProperties: { + downloadSizeInMB: { + serializedName: "downloadSizeInMB", type: { name: "Number" } @@ -473,10 +599,10 @@ export const ClusterNode: coreClient.CompositeMapper = { } }; -export const ClusterPatch: coreClient.CompositeMapper = { +export const MarketplaceGalleryImagesUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterPatch", + className: "MarketplaceGalleryImagesUpdateRequest", modelProperties: { tags: { serializedName: "tags", @@ -484,59 +610,121 @@ export const ClusterPatch: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "String" } } } + } + } + } +}; + +export const MarketplaceGalleryImagesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceGalleryImagesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MarketplaceGalleryImages" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IPConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPConfiguration", + modelProperties: { + name: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$" + ) + }, + serializedName: "name", + type: { + name: "String" + } }, - cloudManagementEndpoint: { - serializedName: "properties.cloudManagementEndpoint", + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "IPConfigurationProperties" + } + } + } + } +}; + +export const IPConfigurationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPConfigurationProperties", + modelProperties: { + gateway: { + serializedName: "gateway", type: { name: "String" } }, - aadClientId: { - serializedName: "properties.aadClientId", + prefixLength: { + serializedName: "prefixLength", type: { name: "String" } }, - aadTenantId: { - serializedName: "properties.aadTenantId", + privateIPAddress: { + serializedName: "privateIPAddress", type: { name: "String" } }, - desiredProperties: { - serializedName: "properties.desiredProperties", + subnet: { + serializedName: "subnet", type: { name: "Composite", - className: "ClusterDesiredProperties" + className: "IPConfigurationPropertiesSubnet" } } } } }; -export const UploadCertificateRequest: coreClient.CompositeMapper = { +export const IPConfigurationPropertiesSubnet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UploadCertificateRequest", + className: "IPConfigurationPropertiesSubnet", modelProperties: { - properties: { - serializedName: "properties", + id: { + serializedName: "id", type: { - name: "Composite", - className: "RawCertificateData" + name: "String" } } } } }; -export const RawCertificateData: coreClient.CompositeMapper = { +export const InterfaceDNSSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RawCertificateData", + className: "InterfaceDNSSettings", modelProperties: { - certificates: { - serializedName: "certificates", + dnsServers: { + serializedName: "dnsServers", type: { name: "Sequence", element: { @@ -550,60 +738,47 @@ export const RawCertificateData: coreClient.CompositeMapper = { } }; -export const ClusterIdentityResponse: coreClient.CompositeMapper = { +export const NetworkInterfaceStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterIdentityResponse", + className: "NetworkInterfaceStatus", modelProperties: { - aadClientId: { - serializedName: "properties.aadClientId", - type: { - name: "String" - } - }, - aadTenantId: { - serializedName: "properties.aadTenantId", + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - aadServicePrincipalObjectId: { - serializedName: "properties.aadServicePrincipalObjectId", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - aadApplicationObjectId: { - serializedName: "properties.aadApplicationObjectId", + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "String" + name: "Composite", + className: "NetworkInterfaceStatusProvisioningStatus" } } } } }; -export const ExtensionList: coreClient.CompositeMapper = { +export const NetworkInterfaceStatusProvisioningStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtensionList", + className: "NetworkInterfaceStatusProvisioningStatus", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + operationId: { + serializedName: "operationId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Extension" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } @@ -612,57 +787,41 @@ export const ExtensionList: coreClient.CompositeMapper = { } }; -export const PerNodeExtensionState: coreClient.CompositeMapper = { +export const NetworkInterfacesUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PerNodeExtensionState", + className: "NetworkInterfacesUpdateRequest", modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - extension: { - serializedName: "extension", - readOnly: true, - type: { - name: "String" - } - }, - state: { - serializedName: "state", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const NetworkInterfacesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "NetworkInterfacesListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "NetworkInterfaces" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -671,79 +830,59 @@ export const OperationListResult: coreClient.CompositeMapper = { } }; -export const Operation: coreClient.CompositeMapper = { +export const StorageContainerStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "StorageContainerStatus", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", type: { - name: "Boolean" + name: "String" } }, - display: { - serializedName: "display", + availableSizeMB: { + serializedName: "availableSizeMB", type: { - name: "Composite", - className: "OperationDisplay" + name: "Number" } }, - origin: { - serializedName: "origin", - readOnly: true, + containerSizeMB: { + serializedName: "containerSizeMB", type: { - name: "String" + name: "Number" } }, - actionType: { - serializedName: "actionType", - readOnly: true, + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "String" + name: "Composite", + className: "StorageContainerStatusProvisioningStatus" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const StorageContainerStatusProvisioningStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "StorageContainerStatusProvisioningStatus", modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - readOnly: true, + operationId: { + serializedName: "operationId", type: { name: "String" } }, - description: { - serializedName: "description", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } @@ -752,47 +891,41 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ArcConnectivityProperties: coreClient.CompositeMapper = { +export const StorageContainersUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcConnectivityProperties", + className: "StorageContainersUpdateRequest", modelProperties: { - enabled: { - serializedName: "enabled", + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { +export const StorageContainersListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "StorageContainersListResult", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + value: { + serializedName: "value", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageContainers" + } + } } }, - location: { - serializedName: "location", - required: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -801,382 +934,2209 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ArcSetting: coreClient.CompositeMapper = { +export const VirtualHardDiskStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSetting", + className: "VirtualHardDiskStatus", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - arcInstanceResourceGroup: { - serializedName: "properties.arcInstanceResourceGroup", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - arcApplicationClientId: { - serializedName: "properties.arcApplicationClientId", + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "String" + name: "Composite", + className: "VirtualHardDiskStatusProvisioningStatus" } - }, - arcApplicationTenantId: { - serializedName: "properties.arcApplicationTenantId", + } + } + } +}; + +export const VirtualHardDiskStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDiskStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", type: { name: "String" } }, - arcServicePrincipalObjectId: { - serializedName: "properties.arcServicePrincipalObjectId", + status: { + serializedName: "status", type: { name: "String" } - }, - arcApplicationObjectId: { - serializedName: "properties.arcApplicationObjectId", - type: { - name: "String" - } - }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + } + } + } +}; + +export const VirtualHardDisksUpdateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisksUpdateRequest", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - perNodeDetails: { - serializedName: "properties.perNodeDetails", - readOnly: true, + } + } + } +}; + +export const VirtualHardDisksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisksListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeState" + className: "VirtualHardDisks" } } } }, - connectivityProperties: { - serializedName: "properties.connectivityProperties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - createdBy: { - serializedName: "systemData.createdBy", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - createdByType: { - serializedName: "systemData.createdByType", + } + } + } +}; + +export const VirtualMachineInstancePropertiesHardwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesHardwareProfile", + modelProperties: { + vmSize: { + serializedName: "vmSize", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + processors: { + serializedName: "processors", type: { - name: "String" + name: "Number" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + memoryMB: { + serializedName: "memoryMB", type: { - name: "String" + name: "Number" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + dynamicMemoryConfig: { + serializedName: "dynamicMemoryConfig", type: { - name: "DateTime" + name: "Composite", + className: + "VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig" } } } } }; -export const Extension: coreClient.CompositeMapper = { +export const VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Extension", + className: + "VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + maximumMemoryMB: { + serializedName: "maximumMemoryMB", type: { - name: "String" + name: "Number" } }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + minimumMemoryMB: { + serializedName: "minimumMemoryMB", type: { - name: "String" + name: "Number" } }, - perNodeExtensionDetails: { - serializedName: "properties.perNodeExtensionDetails", - readOnly: true, + targetMemoryBuffer: { + serializedName: "targetMemoryBuffer", + type: { + name: "Number" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesNetworkProfile", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeExtensionState" + className: + "VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem" } } } - }, - forceUpdateTag: { - serializedName: "properties.extensionParameters.forceUpdateTag", + } + } + } +}; + +export const VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } - }, - publisher: { - serializedName: "properties.extensionParameters.publisher", + } + } + } +}; + +export const VirtualMachineInstancePropertiesOsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfile", + modelProperties: { + adminPassword: { + serializedName: "adminPassword", type: { name: "String" } }, - typePropertiesExtensionParametersType: { - serializedName: "properties.extensionParameters.type", + adminUsername: { + serializedName: "adminUsername", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.extensionParameters.typeHandlerVersion", + computerName: { + serializedName: "computerName", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: - "properties.extensionParameters.autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "properties.extensionParameters.settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "properties.extensionParameters.protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - createdBy: { - serializedName: "systemData.createdBy", + linuxConfiguration: { + serializedName: "linuxConfiguration", type: { - name: "String" + name: "Composite", + className: + "VirtualMachineInstancePropertiesOsProfileLinuxConfiguration" } }, - createdByType: { - serializedName: "systemData.createdByType", + windowsConfiguration: { + serializedName: "windowsConfiguration", type: { - name: "String" + name: "Composite", + className: + "VirtualMachineInstancePropertiesOsProfileWindowsConfiguration" } - }, - createdAt: { - serializedName: "systemData.createdAt", + } + } + } +}; + +export const VirtualMachineInstancePropertiesOsProfileLinuxConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfileLinuxConfiguration", + modelProperties: { + disablePasswordAuthentication: { + serializedName: "disablePasswordAuthentication", type: { - name: "DateTime" + name: "Boolean" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + ssh: { + serializedName: "ssh", type: { - name: "String" + name: "Composite", + className: "SshConfiguration" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + provisionVMAgent: { + defaultValue: true, + serializedName: "provisionVMAgent", type: { - name: "String" + name: "Boolean" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + provisionVMConfigAgent: { + defaultValue: true, + serializedName: "provisionVMConfigAgent", type: { - name: "DateTime" + name: "Boolean" } } } } }; -export const Cluster: coreClient.CompositeMapper = { +export const SshConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cluster", + className: "SshConfiguration", modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + publicKeys: { + serializedName: "publicKeys", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SshPublicKey" + } + } } - }, - status: { - serializedName: "properties.status", - readOnly: true, + } + } + } +}; + +export const SshPublicKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshPublicKey", + modelProperties: { + path: { + serializedName: "path", type: { name: "String" } }, - cloudId: { - serializedName: "properties.cloudId", - readOnly: true, + keyData: { + serializedName: "keyData", type: { name: "String" } - }, - cloudManagementEndpoint: { - serializedName: "properties.cloudManagementEndpoint", + } + } + } +}; + +export const VirtualMachineInstancePropertiesOsProfileWindowsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfileWindowsConfiguration", + modelProperties: { + enableAutomaticUpdates: { + serializedName: "enableAutomaticUpdates", type: { - name: "String" + name: "Boolean" } }, - aadClientId: { - serializedName: "properties.aadClientId", + ssh: { + serializedName: "ssh", type: { - name: "String" + name: "Composite", + className: "SshConfiguration" } }, - aadTenantId: { - serializedName: "properties.aadTenantId", + timeZone: { + serializedName: "timeZone", type: { name: "String" } }, - aadApplicationObjectId: { - serializedName: "properties.aadApplicationObjectId", + provisionVMAgent: { + defaultValue: true, + serializedName: "provisionVMAgent", type: { - name: "String" + name: "Boolean" } }, - aadServicePrincipalObjectId: { - serializedName: "properties.aadServicePrincipalObjectId", + provisionVMConfigAgent: { + defaultValue: true, + serializedName: "provisionVMConfigAgent", type: { - name: "String" + name: "Boolean" } - }, - desiredProperties: { - serializedName: "properties.desiredProperties", + } + } + } +}; + +export const VirtualMachineInstancePropertiesSecurityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesSecurityProfile", + modelProperties: { + enableTPM: { + defaultValue: false, + serializedName: "enableTPM", type: { - name: "Composite", - className: "ClusterDesiredProperties" + name: "Boolean" } }, - reportedProperties: { - serializedName: "properties.reportedProperties", + uefiSettings: { + serializedName: "uefiSettings", type: { name: "Composite", - className: "ClusterReportedProperties" - } - }, - trialDaysRemaining: { - serializedName: "properties.trialDaysRemaining", - readOnly: true, - type: { - name: "Number" + className: + "VirtualMachineInstancePropertiesSecurityProfileUefiSettings" } }, - billingModel: { - serializedName: "properties.billingModel", - readOnly: true, + securityType: { + serializedName: "securityType", type: { name: "String" } - }, - registrationTimestamp: { - serializedName: "properties.registrationTimestamp", - readOnly: true, + } + } + } +}; + +export const VirtualMachineInstancePropertiesSecurityProfileUefiSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesSecurityProfileUefiSettings", + modelProperties: { + secureBootEnabled: { + defaultValue: false, + serializedName: "secureBootEnabled", type: { - name: "DateTime" + name: "Boolean" } - }, - lastSyncTimestamp: { - serializedName: "properties.lastSyncTimestamp", - readOnly: true, + } + } + } +}; + +export const VirtualMachineInstancePropertiesStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfile", + modelProperties: { + dataDisks: { + serializedName: "dataDisks", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesStorageProfileDataDisksItem" + } + } } }, - lastBillingTimestamp: { - serializedName: "properties.lastBillingTimestamp", - readOnly: true, + imageReference: { + serializedName: "imageReference", type: { - name: "DateTime" + name: "Composite", + className: + "VirtualMachineInstancePropertiesStorageProfileImageReference" } }, - serviceEndpoint: { - serializedName: "properties.serviceEndpoint", - readOnly: true, + osDisk: { + serializedName: "osDisk", type: { - name: "String" + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfileOsDisk" } }, - createdBy: { - serializedName: "systemData.createdBy", + vmConfigStoragePathId: { + serializedName: "vmConfigStoragePathId", type: { name: "String" } - }, - createdByType: { - serializedName: "systemData.createdByType", + } + } + } +}; + +export const VirtualMachineInstancePropertiesStorageProfileDataDisksItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfileDataDisksItem", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } - }, - createdAt: { - serializedName: "systemData.createdAt", - type: { - name: "DateTime" + } + } + } +}; + +export const VirtualMachineInstancePropertiesStorageProfileImageReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfileImageReference", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesStorageProfileOsDisk: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfileOsDisk", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + osType: { + serializedName: "osType", + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + } + } + } +}; + +export const VirtualMachineInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceView", + modelProperties: { + vmAgent: { + serializedName: "vmAgent", + type: { + name: "Composite", + className: "VirtualMachineVMConfigAgentInstanceView" + } + } + } + } +}; + +export const VirtualMachineVMConfigAgentInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineVMConfigAgentInstanceView", + modelProperties: { + vmConfigAgentVersion: { + serializedName: "vmVMConfigAgentVersion", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + statuses: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } + } + } + } + } +}; + +export const InstanceViewStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstanceViewStatus", + modelProperties: { + code: { + serializedName: "code", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + level: { + serializedName: "level", + type: { + name: "String" + } + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + } + } + } +}; + +export const VirtualMachineInstanceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + powerState: { + serializedName: "powerState", + type: { + name: "String" + } + }, + provisioningStatus: { + serializedName: "provisioningStatus", + type: { + name: "Composite", + className: "VirtualMachineInstanceStatusProvisioningStatus" + } + } + } + } +}; + +export const VirtualMachineInstanceStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const GuestAgentInstallStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestAgentInstallStatus", + modelProperties: { + vmUuid: { + serializedName: "vmUuid", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + lastStatusChange: { + serializedName: "lastStatusChange", + readOnly: true, type: { name: "DateTime" } + }, + agentVersion: { + serializedName: "agentVersion", + readOnly: true, + type: { + name: "String" + } + }, + errorDetails: { + serializedName: "errorDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } + } + } +}; + +export const Identity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + defaultValue: "SystemAssigned", + isConstant: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstanceUpdateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceUpdateRequest", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "VirtualMachineInstanceUpdateProperties" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + } + } + } +}; + +export const VirtualMachineInstanceUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceUpdateProperties", + modelProperties: { + hardwareProfile: { + serializedName: "hardwareProfile", + type: { + name: "Composite", + className: "HardwareProfileUpdate" + } + }, + storageProfile: { + serializedName: "storageProfile", + type: { + name: "Composite", + className: "StorageProfileUpdate" + } + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "NetworkProfileUpdate" + } + }, + osProfile: { + serializedName: "osProfile", + type: { + name: "Composite", + className: "OsProfileUpdate" + } + } + } + } +}; + +export const HardwareProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HardwareProfileUpdate", + modelProperties: { + vmSize: { + serializedName: "vmSize", + type: { + name: "String" + } + }, + processors: { + serializedName: "processors", + type: { + name: "Number" + } + }, + memoryMB: { + serializedName: "memoryMB", + type: { + name: "Number" + } + } + } + } +}; + +export const StorageProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageProfileUpdate", + modelProperties: { + dataDisks: { + serializedName: "dataDisks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageProfileUpdateDataDisksItem" + } + } + } + } + } + } +}; + +export const StorageProfileUpdateDataDisksItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageProfileUpdateDataDisksItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileUpdate", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkProfileUpdateNetworkInterfacesItem" + } + } + } + } + } + } +}; + +export const NetworkProfileUpdateNetworkInterfacesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileUpdateNetworkInterfacesItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const OsProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsProfileUpdate", + modelProperties: { + computerName: { + serializedName: "computerName", + type: { + name: "String" + } + }, + linuxConfiguration: { + serializedName: "linuxConfiguration", + type: { + name: "Composite", + className: "OsProfileUpdateLinuxConfiguration" + } + }, + windowsConfiguration: { + serializedName: "windowsConfiguration", + type: { + name: "Composite", + className: "OsProfileUpdateWindowsConfiguration" + } + } + } + } +}; + +export const OsProfileUpdateLinuxConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsProfileUpdateLinuxConfiguration", + modelProperties: { + provisionVMAgent: { + serializedName: "provisionVMAgent", + type: { + name: "Boolean" + } + }, + provisionVMConfigAgent: { + serializedName: "provisionVMConfigAgent", + type: { + name: "Boolean" + } + } + } + } +}; + +export const OsProfileUpdateWindowsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsProfileUpdateWindowsConfiguration", + modelProperties: { + provisionVMAgent: { + serializedName: "provisionVMAgent", + type: { + name: "Boolean" + } + }, + provisionVMConfigAgent: { + serializedName: "provisionVMConfigAgent", + type: { + name: "Boolean" + } + } + } + } +}; + +export const VirtualMachineInstanceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const HybridIdentityMetadataList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadataList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HybridIdentityMetadata" + } + } + } + } + } + } +}; + +export const GuestCredential: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestCredential", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const HttpProxyConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpProxyConfiguration", + modelProperties: { + httpsProxy: { + serializedName: "httpsProxy", + type: { + name: "String" + } + } + } + } +}; + +export const GuestAgentList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestAgentList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GuestAgent" + } + } + } + } + } + } +}; + +export const VirtualNetworkPropertiesDhcpOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworkPropertiesDhcpOptions", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualNetworkPropertiesSubnetsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworkPropertiesSubnetsItem", + modelProperties: { + name: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$" + ) + }, + serializedName: "name", + type: { + name: "String" + } + }, + addressPrefix: { + serializedName: "properties.addressPrefix", + type: { + name: "String" + } + }, + addressPrefixes: { + serializedName: "properties.addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipAllocationMethod: { + serializedName: "properties.ipAllocationMethod", + type: { + name: "String" + } + }, + ipConfigurationReferences: { + serializedName: "properties.ipConfigurationReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems" + } + } + } + }, + routeTable: { + serializedName: "properties.routeTable", + type: { + name: "Composite", + className: + "ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable" + } + }, + vlan: { + serializedName: "properties.vlan", + type: { + name: "Number" + } + } + } + } +}; + +export const ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ComponentsCr63WSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ComponentsI4F0MhSchemasVirtualnetworkpropertiesPropertiesSubnetsItemsPropertiesRoutetable", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + routes: { + serializedName: "properties.routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkPropertiesSubnetsPropertiesItemsItem" + } + } + } + } + } + } +}; + +export const VirtualNetworkPropertiesSubnetsPropertiesItemsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworkPropertiesSubnetsPropertiesItemsItem", + modelProperties: { + name: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$" + ) + }, + serializedName: "name", + type: { + name: "String" + } + }, + addressPrefix: { + serializedName: "properties.addressPrefix", + type: { + name: "String" + } + }, + nextHopIpAddress: { + serializedName: "properties.nextHopIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworkStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + provisioningStatus: { + serializedName: "provisioningStatus", + type: { + name: "Composite", + className: "VirtualNetworkStatusProvisioningStatus" + } + } + } + } +}; + +export const VirtualNetworkStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworkStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksUpdateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksUpdateRequest", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const VirtualNetworksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworks" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryOSDiskImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryOSDiskImage", + modelProperties: { + ...GalleryDiskImage.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const GalleryImages: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImages", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + containerId: { + serializedName: "properties.containerId", + type: { + name: "String" + } + }, + imagePath: { + serializedName: "properties.imagePath", + type: { + name: "String" + } + }, + osType: { + serializedName: "properties.osType", + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + }, + cloudInitDataSource: { + serializedName: "properties.cloudInitDataSource", + type: { + name: "String" + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", + type: { + name: "String" + } + }, + identifier: { + serializedName: "properties.identifier", + type: { + name: "Composite", + className: "GalleryImageIdentifier" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "Composite", + className: "GalleryImageVersion" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "GalleryImageStatus" + } + } + } + } +}; + +export const MarketplaceGalleryImages: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceGalleryImages", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + containerId: { + serializedName: "properties.containerId", + type: { + name: "String" + } + }, + osType: { + serializedName: "properties.osType", + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + }, + cloudInitDataSource: { + serializedName: "properties.cloudInitDataSource", + type: { + name: "String" + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", + type: { + name: "String" + } + }, + identifier: { + serializedName: "properties.identifier", + type: { + name: "Composite", + className: "GalleryImageIdentifier" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "Composite", + className: "GalleryImageVersion" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "MarketplaceGalleryImageStatus" + } + } + } + } +}; + +export const NetworkInterfaces: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfaces", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + ipConfigurations: { + serializedName: "properties.ipConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPConfiguration" + } + } + } + }, + macAddress: { + serializedName: "properties.macAddress", + type: { + name: "String" + } + }, + dnsSettings: { + serializedName: "properties.dnsSettings", + type: { + name: "Composite", + className: "InterfaceDNSSettings" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "NetworkInterfaceStatus" + } + } + } + } +}; + +export const StorageContainers: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainers", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "StorageContainerStatus" + } + } + } + } +}; + +export const VirtualHardDisks: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisks", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + blockSizeBytes: { + serializedName: "properties.blockSizeBytes", + type: { + name: "Number" + } + }, + diskSizeGB: { + serializedName: "properties.diskSizeGB", + type: { + name: "Number" + } + }, + dynamic: { + serializedName: "properties.dynamic", + type: { + name: "Boolean" + } + }, + logicalSectorBytes: { + serializedName: "properties.logicalSectorBytes", + type: { + name: "Number" + } + }, + physicalSectorBytes: { + serializedName: "properties.physicalSectorBytes", + type: { + name: "Number" + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", + type: { + name: "String" + } + }, + diskFileFormat: { + serializedName: "properties.diskFileFormat", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + containerId: { + serializedName: "properties.containerId", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "VirtualHardDiskStatus" + } + } + } + } +}; + +export const VirtualNetworks: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworks", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + dhcpOptions: { + serializedName: "properties.dhcpOptions", + type: { + name: "Composite", + className: "VirtualNetworkPropertiesDhcpOptions" + } + }, + networkType: { + serializedName: "properties.networkType", + type: { + name: "String" + } + }, + subnets: { + serializedName: "properties.subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkPropertiesSubnetsItem" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + vmSwitchName: { + serializedName: "properties.vmSwitchName", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "VirtualNetworkStatus" + } + } + } + } +}; + +export const VirtualMachineInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstance", + modelProperties: { + ...ProxyResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + hardwareProfile: { + serializedName: "properties.hardwareProfile", + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesHardwareProfile" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesNetworkProfile" + } + }, + osProfile: { + serializedName: "properties.osProfile", + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfile" + } + }, + securityProfile: { + serializedName: "properties.securityProfile", + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesSecurityProfile" + } + }, + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfile" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "VirtualMachineInstanceView" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "VirtualMachineInstanceStatus" + } + }, + guestAgentInstallStatus: { + serializedName: "properties.guestAgentInstallStatus", + type: { + name: "Composite", + className: "GuestAgentInstallStatus" + } + }, + vmId: { + serializedName: "properties.vmId", + readOnly: true, + type: { + name: "String" + } + }, + resourceUid: { + serializedName: "properties.resourceUid", + type: { + name: "String" + } + } + } + } +}; + +export const HybridIdentityMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadata", + modelProperties: { + ...ProxyResource.type.modelProperties, + resourceUid: { + serializedName: "properties.resourceUid", + type: { + name: "String" + } + }, + publicKey: { + serializedName: "properties.publicKey", + type: { + name: "String" + } + }, + identity: { + serializedName: "properties.identity", + type: { + name: "Composite", + className: "Identity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GuestAgent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestAgent", + modelProperties: { + ...ProxyResource.type.modelProperties, + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "GuestCredential" + } + }, + httpProxyConfig: { + serializedName: "properties.httpProxyConfig", + type: { + name: "Composite", + className: "HttpProxyConfiguration" + } + }, + provisioningAction: { + serializedName: "properties.provisioningAction", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GalleryImagesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImagesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryImagesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImagesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const MarketplaceGalleryImagesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceGalleryImagesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const MarketplaceGalleryImagesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceGalleryImagesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const StorageContainersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const StorageContainersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualHardDisksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualHardDisksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisksUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesRestartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const GuestAgentDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestAgentDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } } } } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts index d14a11a57d80..2768a4860462 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts @@ -12,12 +12,21 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - ArcSetting as ArcSettingMapper, - ArcSettingsPatch as ArcSettingsPatchMapper, - Cluster as ClusterMapper, - ClusterPatch as ClusterPatchMapper, - UploadCertificateRequest as UploadCertificateRequestMapper, - Extension as ExtensionMapper + GalleryImages as GalleryImagesMapper, + GalleryImagesUpdateRequest as GalleryImagesUpdateRequestMapper, + MarketplaceGalleryImages as MarketplaceGalleryImagesMapper, + MarketplaceGalleryImagesUpdateRequest as MarketplaceGalleryImagesUpdateRequestMapper, + NetworkInterfaces as NetworkInterfacesMapper, + NetworkInterfacesUpdateRequest as NetworkInterfacesUpdateRequestMapper, + StorageContainers as StorageContainersMapper, + StorageContainersUpdateRequest as StorageContainersUpdateRequestMapper, + VirtualHardDisks as VirtualHardDisksMapper, + VirtualHardDisksUpdateRequest as VirtualHardDisksUpdateRequestMapper, + VirtualMachineInstance as VirtualMachineInstanceMapper, + VirtualMachineInstanceUpdateRequest as VirtualMachineInstanceUpdateRequestMapper, + GuestAgent as GuestAgentMapper, + VirtualNetworks as VirtualNetworksMapper, + VirtualNetworksUpdateRequest as VirtualNetworksUpdateRequestMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -73,10 +82,17 @@ export const resourceGroupName: OperationURLParameter = { } }; -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", +export const galleryImageName: OperationURLParameter = { + parameterPath: "galleryImageName", mapper: { - serializedName: "clusterName", + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[a-zA-Z0-9]$" + ), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "galleryImageName", required: true, type: { name: "String" @@ -87,7 +103,7 @@ export const clusterName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2023-07-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -96,17 +112,6 @@ export const apiVersion: OperationQueryParameter = { } }; -export const arcSettingName: OperationURLParameter = { - parameterPath: "arcSettingName", - mapper: { - serializedName: "arcSettingName", - required: true, - type: { - name: "String" - } - } -}; - export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], mapper: { @@ -119,14 +124,14 @@ export const contentType: OperationParameter = { } }; -export const arcSetting: OperationParameter = { - parameterPath: "arcSetting", - mapper: ArcSettingMapper +export const galleryImages: OperationParameter = { + parameterPath: "galleryImages", + mapper: GalleryImagesMapper }; -export const arcSetting1: OperationParameter = { - parameterPath: "arcSetting", - mapper: ArcSettingsPatchMapper +export const galleryImages1: OperationParameter = { + parameterPath: "galleryImages", + mapper: GalleryImagesUpdateRequestMapper }; export const nextLink: OperationURLParameter = { @@ -141,25 +146,156 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const cluster: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterMapper +export const marketplaceGalleryImageName: OperationURLParameter = { + parameterPath: "marketplaceGalleryImageName", + mapper: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[a-zA-Z0-9]$" + ), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "marketplaceGalleryImageName", + required: true, + type: { + name: "String" + } + } +}; + +export const marketplaceGalleryImages: OperationParameter = { + parameterPath: "marketplaceGalleryImages", + mapper: MarketplaceGalleryImagesMapper +}; + +export const marketplaceGalleryImages1: OperationParameter = { + parameterPath: "marketplaceGalleryImages", + mapper: MarketplaceGalleryImagesUpdateRequestMapper +}; + +export const networkInterfaceName: OperationURLParameter = { + parameterPath: "networkInterfaceName", + mapper: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$" + ), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "networkInterfaceName", + required: true, + type: { + name: "String" + } + } +}; + +export const networkInterfaces: OperationParameter = { + parameterPath: "networkInterfaces", + mapper: NetworkInterfacesMapper +}; + +export const networkInterfaces1: OperationParameter = { + parameterPath: "networkInterfaces", + mapper: NetworkInterfacesUpdateRequestMapper +}; + +export const storageContainerName: OperationURLParameter = { + parameterPath: "storageContainerName", + mapper: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[_a-zA-Z0-9]$" + ), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "storageContainerName", + required: true, + type: { + name: "String" + } + } +}; + +export const storageContainers: OperationParameter = { + parameterPath: "storageContainers", + mapper: StorageContainersMapper +}; + +export const storageContainers1: OperationParameter = { + parameterPath: "storageContainers", + mapper: StorageContainersUpdateRequestMapper +}; + +export const virtualHardDiskName: OperationURLParameter = { + parameterPath: "virtualHardDiskName", + mapper: { + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$" + ), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "virtualHardDiskName", + required: true, + type: { + name: "String" + } + } +}; + +export const virtualHardDisks: OperationParameter = { + parameterPath: "virtualHardDisks", + mapper: VirtualHardDisksMapper +}; + +export const virtualHardDisks1: OperationParameter = { + parameterPath: "virtualHardDisks", + mapper: VirtualHardDisksUpdateRequestMapper +}; + +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", + mapper: { + serializedName: "resourceUri", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const virtualMachineInstance: OperationParameter = { + parameterPath: "virtualMachineInstance", + mapper: VirtualMachineInstanceMapper }; -export const cluster1: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterPatchMapper +export const virtualMachineInstance1: OperationParameter = { + parameterPath: "virtualMachineInstance", + mapper: VirtualMachineInstanceUpdateRequestMapper }; -export const uploadCertificateRequest: OperationParameter = { - parameterPath: "uploadCertificateRequest", - mapper: UploadCertificateRequestMapper +export const body: OperationParameter = { + parameterPath: ["options", "body"], + mapper: GuestAgentMapper }; -export const extensionName: OperationURLParameter = { - parameterPath: "extensionName", +export const virtualNetworkName: OperationURLParameter = { + parameterPath: "virtualNetworkName", mapper: { - serializedName: "extensionName", + constraints: { + Pattern: new RegExp( + "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[_a-zA-Z0-9]$" + ), + MaxLength: 64, + MinLength: 2 + }, + serializedName: "virtualNetworkName", required: true, type: { name: "String" @@ -167,7 +303,12 @@ export const extensionName: OperationURLParameter = { } }; -export const extension: OperationParameter = { - parameterPath: "extension", - mapper: ExtensionMapper +export const virtualNetworks: OperationParameter = { + parameterPath: "virtualNetworks", + mapper: VirtualNetworksMapper +}; + +export const virtualNetworks1: OperationParameter = { + parameterPath: "virtualNetworks", + mapper: VirtualNetworksUpdateRequestMapper }; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts deleted file mode 100644 index a9b4f814fd0a..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ArcSettings } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureStackHCIClient } from "../azureStackHCIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - ArcSetting, - ArcSettingsListByClusterNextOptionalParams, - ArcSettingsListByClusterOptionalParams, - ArcSettingsListByClusterResponse, - ArcSettingsGetOptionalParams, - ArcSettingsGetResponse, - ArcSettingsCreateOptionalParams, - ArcSettingsCreateResponse, - ArcSettingsPatch, - ArcSettingsUpdateOptionalParams, - ArcSettingsUpdateResponse, - ArcSettingsDeleteOptionalParams, - ArcSettingsGeneratePasswordOptionalParams, - ArcSettingsGeneratePasswordResponse, - ArcSettingsCreateIdentityOptionalParams, - ArcSettingsCreateIdentityResponse, - ArcSettingsListByClusterNextResponse -} from "../models"; - -/// -/** Class containing ArcSettings operations. */ -export class ArcSettingsImpl implements ArcSettings { - private readonly client: AzureStackHCIClient; - - /** - * Initialize a new instance of the class ArcSettings class. - * @param client Reference to the service client - */ - constructor(client: AzureStackHCIClient) { - this.client = client; - } - - /** - * Get ArcSetting resources of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - public listByCluster( - resourceGroupName: string, - clusterName: string, - options?: ArcSettingsListByClusterOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByClusterPagingAll( - resourceGroupName, - clusterName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByClusterPagingPage( - resourceGroupName, - clusterName, - options, - settings - ); - } - }; - } - - private async *listByClusterPagingPage( - resourceGroupName: string, - clusterName: string, - options?: ArcSettingsListByClusterOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ArcSettingsListByClusterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByCluster( - resourceGroupName, - clusterName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByClusterNext( - resourceGroupName, - clusterName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByClusterPagingAll( - resourceGroupName: string, - clusterName: string, - options?: ArcSettingsListByClusterOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByClusterPagingPage( - resourceGroupName, - clusterName, - options - )) { - yield* page; - } - } - - /** - * Get ArcSetting resources of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - private _listByCluster( - resourceGroupName: string, - clusterName: string, - options?: ArcSettingsListByClusterOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listByClusterOperationSpec - ); - } - - /** - * Get ArcSetting resource details of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, arcSettingName, options }, - getOperationSpec - ); - } - - /** - * Create ArcSetting for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - arcSetting: ArcSetting, - options?: ArcSettingsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, arcSettingName, arcSetting, options }, - createOperationSpec - ); - } - - /** - * Update ArcSettings for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param arcSetting ArcSettings parameters that needs to be updated - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - arcSetting: ArcSettingsPatch, - options?: ArcSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, arcSettingName, arcSetting, options }, - updateOperationSpec - ); - } - - /** - * Delete ArcSetting resource details of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsDeleteOptionalParams - ): 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, clusterName, arcSettingName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Delete ArcSetting resource details of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - arcSettingName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Generate password for arc settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - generatePassword( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsGeneratePasswordOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, arcSettingName, options }, - generatePasswordOperationSpec - ); - } - - /** - * Create Aad identity for arc settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - async beginCreateIdentity( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsCreateIdentityOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ArcSettingsCreateIdentityResponse - > - > { - 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, clusterName, arcSettingName, options }, - createIdentityOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create Aad identity for arc settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - async beginCreateIdentityAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsCreateIdentityOptionalParams - ): Promise { - const poller = await this.beginCreateIdentity( - resourceGroupName, - clusterName, - arcSettingName, - options - ); - return poller.pollUntilDone(); - } - - /** - * ListByClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param nextLink The nextLink from the previous successful call to the ListByCluster method. - * @param options The options parameters. - */ - private _listByClusterNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: ArcSettingsListByClusterNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listByClusterNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByClusterOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ArcSettingList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ArcSetting - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ArcSetting - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.arcSetting, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ArcSetting - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.arcSetting1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const generatePasswordOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PasswordCredential - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createIdentityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ArcIdentityResponse - }, - 201: { - bodyMapper: Mappers.ArcIdentityResponse - }, - 202: { - bodyMapper: Mappers.ArcIdentityResponse - }, - 204: { - bodyMapper: Mappers.ArcIdentityResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByClusterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ArcSettingList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts deleted file mode 100644 index 8cf5ce68f745..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts +++ /dev/null @@ -1,692 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Extensions } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureStackHCIClient } from "../azureStackHCIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - Extension, - ExtensionsListByArcSettingNextOptionalParams, - ExtensionsListByArcSettingOptionalParams, - ExtensionsListByArcSettingResponse, - ExtensionsGetOptionalParams, - ExtensionsGetResponse, - ExtensionsCreateOptionalParams, - ExtensionsCreateResponse, - ExtensionsUpdateOptionalParams, - ExtensionsUpdateResponse, - ExtensionsDeleteOptionalParams, - ExtensionsListByArcSettingNextResponse -} from "../models"; - -/// -/** Class containing Extensions operations. */ -export class ExtensionsImpl implements Extensions { - private readonly client: AzureStackHCIClient; - - /** - * Initialize a new instance of the class Extensions class. - * @param client Reference to the service client - */ - constructor(client: AzureStackHCIClient) { - this.client = client; - } - - /** - * List all Extensions under ArcSetting resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - public listByArcSetting( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ExtensionsListByArcSettingOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByArcSettingPagingAll( - resourceGroupName, - clusterName, - arcSettingName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByArcSettingPagingPage( - resourceGroupName, - clusterName, - arcSettingName, - options, - settings - ); - } - }; - } - - private async *listByArcSettingPagingPage( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ExtensionsListByArcSettingOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ExtensionsListByArcSettingResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByArcSetting( - resourceGroupName, - clusterName, - arcSettingName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByArcSettingNext( - resourceGroupName, - clusterName, - arcSettingName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByArcSettingPagingAll( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ExtensionsListByArcSettingOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByArcSettingPagingPage( - resourceGroupName, - clusterName, - arcSettingName, - options - )) { - yield* page; - } - } - - /** - * List all Extensions under ArcSetting resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - private _listByArcSetting( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ExtensionsListByArcSettingOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, arcSettingName, options }, - listByArcSettingOperationSpec - ); - } - - /** - * Get particular Arc Extension of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - options?: ExtensionsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - arcSettingName, - extensionName, - options - }, - getOperationSpec - ); - } - - /** - * Create Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ExtensionsCreateResponse - > - > { - 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, - clusterName, - arcSettingName, - extensionName, - extension, - options - }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsCreateOptionalParams - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - clusterName, - arcSettingName, - extensionName, - extension, - options - ); - return poller.pollUntilDone(); - } - - /** - * Update Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ExtensionsUpdateResponse - > - > { - 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, - clusterName, - arcSettingName, - extensionName, - extension, - options - }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "original-uri" - }); - await poller.poll(); - return poller; - } - - /** - * Update Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterName, - arcSettingName, - extensionName, - extension, - options - ); - return poller.pollUntilDone(); - } - - /** - * Delete particular Arc Extension of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - options?: ExtensionsDeleteOptionalParams - ): 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, - clusterName, - arcSettingName, - extensionName, - options - }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Delete particular Arc Extension of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - options?: ExtensionsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - arcSettingName, - extensionName, - options - ); - return poller.pollUntilDone(); - } - - /** - * ListByArcSettingNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param nextLink The nextLink from the previous successful call to the ListByArcSetting method. - * @param options The options parameters. - */ - private _listByArcSettingNext( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - nextLink: string, - options?: ExtensionsListByArcSettingNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, arcSettingName, nextLink, options }, - listByArcSettingNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByArcSettingOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExtensionList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Extension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName, - Parameters.extensionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Extension - }, - 201: { - bodyMapper: Mappers.Extension - }, - 202: { - bodyMapper: Mappers.Extension - }, - 204: { - bodyMapper: Mappers.Extension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.extension, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName, - Parameters.extensionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Extension - }, - 201: { - bodyMapper: Mappers.Extension - }, - 202: { - bodyMapper: Mappers.Extension - }, - 204: { - bodyMapper: Mappers.Extension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.extension, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName, - Parameters.extensionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName, - Parameters.extensionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByArcSettingNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExtensionList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.arcSettingName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/galleryImagesOperations.ts similarity index 54% rename from sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts rename to sdk/azurestackhci/arm-azurestackhci/src/operations/galleryImagesOperations.ts index 0dcec8886e8a..d773993b88f5 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/galleryImagesOperations.ts @@ -8,44 +8,44 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { Clusters } from "../operationsInterfaces"; +import { GalleryImagesOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureStackHCIClient } from "../azureStackHCIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; import { - Cluster, - ClustersListBySubscriptionNextOptionalParams, - ClustersListBySubscriptionOptionalParams, - ClustersListBySubscriptionResponse, - ClustersListByResourceGroupNextOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersListByResourceGroupResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOptionalParams, - ClustersCreateResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - UploadCertificateRequest, - ClustersUploadCertificateOptionalParams, - ClustersCreateIdentityOptionalParams, - ClustersCreateIdentityResponse, - ClustersListBySubscriptionNextResponse, - ClustersListByResourceGroupNextResponse + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GalleryImages, + GalleryImagesListNextOptionalParams, + GalleryImagesListOptionalParams, + GalleryImagesListResponse, + GalleryImagesListAllNextOptionalParams, + GalleryImagesListAllOptionalParams, + GalleryImagesListAllResponse, + GalleryImagesGetOptionalParams, + GalleryImagesGetResponse, + GalleryImagesCreateOrUpdateOptionalParams, + GalleryImagesCreateOrUpdateResponse, + GalleryImagesDeleteOptionalParams, + GalleryImagesUpdateRequest, + GalleryImagesUpdateOptionalParams, + GalleryImagesUpdateResponse, + GalleryImagesListNextResponse, + GalleryImagesListAllNextResponse } from "../models"; /// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { +/** Class containing GalleryImagesOperations operations. */ +export class GalleryImagesOperationsImpl implements GalleryImagesOperations { private readonly client: AzureStackHCIClient; /** - * Initialize a new instance of the class Clusters class. + * Initialize a new instance of the class GalleryImagesOperations class. * @param client Reference to the service client */ constructor(client: AzureStackHCIClient) { @@ -53,13 +53,16 @@ export class ClustersImpl implements Clusters { } /** - * List all HCI clusters in a subscription. + * Lists all of the gallery images in the specified resource group. Use the nextLink property in the + * response to get the next page of gallery images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ - public listBySubscription( - options?: ClustersListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); + public list( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); return { next() { return iter.next(); @@ -71,26 +74,31 @@ export class ClustersImpl implements Clusters { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listBySubscriptionPagingPage(options, settings); + return this.listPagingPage(resourceGroupName, options, settings); } }; } - private async *listBySubscriptionPagingPage( - options?: ClustersListBySubscriptionOptionalParams, + private async *listPagingPage( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: ClustersListBySubscriptionResponse; + ): AsyncIterableIterator { + let result: GalleryImagesListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listBySubscription(options); + result = await this._list(resourceGroupName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -98,24 +106,24 @@ export class ClustersImpl implements Clusters { } } - private async *listBySubscriptionPagingAll( - options?: ClustersListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { + private async *listPagingAll( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { yield* page; } } /** - * List all HCI clusters in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * Lists all of the gallery images in the specified subscription. Use the nextLink property in the + * response to get the next page of gallery images. * @param options The options parameters. */ - public listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + public listAll( + options?: GalleryImagesListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); return { next() { return iter.next(); @@ -127,35 +135,26 @@ export class ClustersImpl implements Clusters { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); + return this.listAllPagingPage(options, settings); } }; } - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams, + private async *listAllPagingPage( + options?: GalleryImagesListAllOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: ClustersListByResourceGroupResponse; + ): AsyncIterableIterator { + let result: GalleryImagesListAllResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); + result = await this._listAll(options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); + result = await this._listAllNext(continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -163,119 +162,57 @@ export class ClustersImpl implements Clusters { } } - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { + private async *listAllPagingAll( + options?: GalleryImagesListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { yield* page; } } /** - * List all HCI clusters in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ClustersListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * List all HCI clusters in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Get HCI cluster. + * Gets a gallery image * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param galleryImageName Name of the gallery image * @param options The options parameters. */ get( resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams - ): Promise { + galleryImageName: string, + options?: GalleryImagesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, + { resourceGroupName, galleryImageName, options }, getOperationSpec ); } /** - * Create an HCI cluster. + * The operation to create or update a gallery image. Please note some properties can be set only + * during gallery image creation. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource definition. * @param options The options parameters. */ - create( + async beginCreateOrUpdate( resourceGroupName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, cluster, options }, - createOperationSpec - ); - } - - /** - * Update an HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - cluster: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, cluster, options }, - updateOperationSpec - ); - } - - /** - * Delete an HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise, void>> { + galleryImageName: string, + galleryImages: GalleryImages, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GalleryImagesCreateOrUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -308,58 +245,64 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryImageName, galleryImages, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImagesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; } /** - * Delete an HCI cluster. + * The operation to create or update a gallery image. Please note some properties can be set only + * during gallery image creation. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource definition. * @param options The options parameters. */ - async beginDeleteAndWait( + async beginCreateOrUpdateAndWait( resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( + galleryImageName: string, + galleryImages: GalleryImages, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, - clusterName, + galleryImageName, + galleryImages, options ); return poller.pollUntilDone(); } /** - * Upload certificate. + * The operation to delete a gallery image. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param uploadCertificateRequest Upload certificate request. + * @param galleryImageName Name of the gallery image * @param options The options parameters. */ - async beginUploadCertificate( + async beginDelete( resourceGroupName: string, - clusterName: string, - uploadCertificateRequest: UploadCertificateRequest, - options?: ClustersUploadCertificateOptionalParams - ): Promise, void>> { + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): 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 ) => { @@ -392,65 +335,64 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, uploadCertificateRequest, options }, - uploadCertificateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryImageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; } /** - * Upload certificate. + * The operation to delete a gallery image. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param uploadCertificateRequest Upload certificate request. + * @param galleryImageName Name of the gallery image * @param options The options parameters. */ - async beginUploadCertificateAndWait( + async beginDeleteAndWait( resourceGroupName: string, - clusterName: string, - uploadCertificateRequest: UploadCertificateRequest, - options?: ClustersUploadCertificateOptionalParams + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams ): Promise { - const poller = await this.beginUploadCertificate( + const poller = await this.beginDelete( resourceGroupName, - clusterName, - uploadCertificateRequest, + galleryImageName, options ); return poller.pollUntilDone(); } /** - * Create cluster identity. + * The operation to update a gallery image. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource patch definition. * @param options The options parameters. */ - async beginCreateIdentity( + async beginUpdate( resourceGroupName: string, - clusterName: string, - options?: ClustersCreateIdentityOptionalParams + galleryImageName: string, + galleryImages: GalleryImagesUpdateRequest, + options?: GalleryImagesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, - ClustersCreateIdentityResponse + SimplePollerLike< + OperationState, + GalleryImagesUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -483,98 +425,113 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - createIdentityOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, galleryImageName, galleryImages, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImagesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs }); await poller.poll(); return poller; } /** - * Create cluster identity. + * The operation to update a gallery image. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource patch definition. * @param options The options parameters. */ - async beginCreateIdentityAndWait( + async beginUpdateAndWait( resourceGroupName: string, - clusterName: string, - options?: ClustersCreateIdentityOptionalParams - ): Promise { - const poller = await this.beginCreateIdentity( + galleryImageName: string, + galleryImages: GalleryImagesUpdateRequest, + options?: GalleryImagesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( resourceGroupName, - clusterName, + galleryImageName, + galleryImages, options ); return poller.pollUntilDone(); } /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * Lists all of the gallery images in the specified resource group. Use the nextLink property in the + * response to get the next page of gallery images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ - private _listBySubscriptionNext( - nextLink: string, - options?: ClustersListBySubscriptionNextOptionalParams - ): Promise { + private _list( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec + { resourceGroupName, options }, + listOperationSpec ); } /** - * ListByResourceGroupNext + * Lists all of the gallery images in the specified subscription. Use the nextLink property in the + * response to get the next page of gallery images. + * @param options The options parameters. + */ + private _listAll( + options?: GalleryImagesListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + + /** + * ListNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ - private _listByResourceGroupNext( + private _listNext( resourceGroupName: string, nextLink: string, - options?: ClustersListByResourceGroupNextOptionalParams - ): Promise { + options?: GalleryImagesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + listNextOperationSpec + ); + } + + /** + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. + */ + private _listAllNext( + nextLink: string, + options?: GalleryImagesListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.GalleryImages }, default: { bodyMapper: Mappers.ErrorResponse @@ -584,90 +541,109 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.galleryImageName ], headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Cluster + bodyMapper: Mappers.GalleryImages + }, + 201: { + bodyMapper: Mappers.GalleryImages + }, + 202: { + bodyMapper: Mappers.GalleryImages + }, + 204: { + bodyMapper: Mappers.GalleryImages }, default: { bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.galleryImages, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.galleryImageName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const createOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "PUT", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.Cluster - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.cluster, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.galleryImageName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.Cluster + bodyMapper: Mappers.GalleryImages + }, + 201: { + bodyMapper: Mappers.GalleryImages + }, + 202: { + bodyMapper: Mappers.GalleryImages + }, + 204: { + bodyMapper: Mappers.GalleryImages }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.cluster1, + requestBody: Parameters.galleryImages1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.galleryImageName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const deleteOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "DELETE", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages", + httpMethod: "GET", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.GalleryImagesListResult + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -676,104 +652,62 @@ const deleteOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer }; -const uploadCertificateOperationSpec: coreClient.OperationSpec = { +const listAllOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.uploadCertificateRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const createIdentityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/galleryImages", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterIdentityResponse - }, - 201: { - bodyMapper: Mappers.ClusterIdentityResponse - }, - 202: { - bodyMapper: Mappers.ClusterIdentityResponse - }, - 204: { - bodyMapper: Mappers.ClusterIdentityResponse + bodyMapper: Mappers.GalleryImagesListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer }; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.GalleryImagesListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listAllNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.GalleryImagesListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/guestAgentOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/guestAgentOperations.ts new file mode 100644 index 000000000000..705875b33265 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/guestAgentOperations.ts @@ -0,0 +1,299 @@ +/* + * 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 { GuestAgentOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GuestAgentCreateOptionalParams, + GuestAgentCreateResponse, + GuestAgentGetOptionalParams, + GuestAgentGetResponse, + GuestAgentDeleteOptionalParams, + GuestAgentDeleteResponse +} from "../models"; + +/** Class containing GuestAgentOperations operations. */ +export class GuestAgentOperationsImpl implements GuestAgentOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class GuestAgentOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreate( + resourceUri: string, + options?: GuestAgentCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GuestAgentCreateResponse + > + > { + 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: { resourceUri, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + GuestAgentCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceUri: string, + options?: GuestAgentCreateOptionalParams + ): Promise { + const poller = await this.beginCreate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Implements GuestAgent GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: GuestAgentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDelete( + resourceUri: string, + options?: GuestAgentDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GuestAgentDeleteResponse + > + > { + 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: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + GuestAgentDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceUri: string, + options?: GuestAgentDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GuestAgent + }, + 201: { + bodyMapper: Mappers.GuestAgent + }, + 202: { + bodyMapper: Mappers.GuestAgent + }, + 204: { + bodyMapper: Mappers.GuestAgent + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgent + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.GuestAgentDeleteHeaders + }, + 201: { + headersMapper: Mappers.GuestAgentDeleteHeaders + }, + 202: { + headersMapper: Mappers.GuestAgentDeleteHeaders + }, + 204: { + headersMapper: Mappers.GuestAgentDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/guestAgents.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/guestAgents.ts new file mode 100644 index 000000000000..026c7e3eadad --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/guestAgents.ts @@ -0,0 +1,168 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { GuestAgents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + GuestAgent, + GuestAgentsListNextOptionalParams, + GuestAgentsListOptionalParams, + GuestAgentsListResponse, + GuestAgentsListNextResponse +} from "../models"; + +/// +/** Class containing GuestAgents operations. */ +export class GuestAgentsImpl implements GuestAgents { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class GuestAgents class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: GuestAgentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: GuestAgentsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GuestAgentsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: GuestAgentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: GuestAgentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: GuestAgentsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgentList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgentList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/hybridIdentityMetadataOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/hybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..0415e2826c18 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/hybridIdentityMetadataOperations.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { HybridIdentityMetadataOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + HybridIdentityMetadata, + HybridIdentityMetadataListNextOptionalParams, + HybridIdentityMetadataListOptionalParams, + HybridIdentityMetadataListResponse, + HybridIdentityMetadataGetOptionalParams, + HybridIdentityMetadataGetResponse, + HybridIdentityMetadataListNextResponse +} from "../models"; + +/// +/** Class containing HybridIdentityMetadataOperations operations. */ +export class HybridIdentityMetadataOperationsImpl + implements HybridIdentityMetadataOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class HybridIdentityMetadataOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: HybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: HybridIdentityMetadataListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: HybridIdentityMetadataListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: HybridIdentityMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: HybridIdentityMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: HybridIdentityMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: HybridIdentityMetadataListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadata + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts index 2d20c6edaf47..b7aa517f2268 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts @@ -6,7 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./arcSettings"; -export * from "./clusters"; -export * from "./extensions"; +export * from "./galleryImagesOperations"; export * from "./operations"; +export * from "./marketplaceGalleryImagesOperations"; +export * from "./networkInterfacesOperations"; +export * from "./storageContainersOperations"; +export * from "./virtualHardDisksOperations"; +export * from "./virtualMachineInstances"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./guestAgentOperations"; +export * from "./guestAgents"; +export * from "./virtualNetworksOperations"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/marketplaceGalleryImagesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/marketplaceGalleryImagesOperations.ts new file mode 100644 index 000000000000..4b63de141c78 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/marketplaceGalleryImagesOperations.ts @@ -0,0 +1,727 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { MarketplaceGalleryImagesOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + MarketplaceGalleryImages, + MarketplaceGalleryImagesListNextOptionalParams, + MarketplaceGalleryImagesListOptionalParams, + MarketplaceGalleryImagesListResponse, + MarketplaceGalleryImagesListAllNextOptionalParams, + MarketplaceGalleryImagesListAllOptionalParams, + MarketplaceGalleryImagesListAllResponse, + MarketplaceGalleryImagesGetOptionalParams, + MarketplaceGalleryImagesGetResponse, + MarketplaceGalleryImagesCreateOrUpdateOptionalParams, + MarketplaceGalleryImagesCreateOrUpdateResponse, + MarketplaceGalleryImagesDeleteOptionalParams, + MarketplaceGalleryImagesUpdateRequest, + MarketplaceGalleryImagesUpdateOptionalParams, + MarketplaceGalleryImagesUpdateResponse, + MarketplaceGalleryImagesListNextResponse, + MarketplaceGalleryImagesListAllNextResponse +} from "../models"; + +/// +/** Class containing MarketplaceGalleryImagesOperations operations. */ +export class MarketplaceGalleryImagesOperationsImpl + implements MarketplaceGalleryImagesOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class MarketplaceGalleryImagesOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink + * property in the response to get the next page of marketplace gallery images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: MarketplaceGalleryImagesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: MarketplaceGalleryImagesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: MarketplaceGalleryImagesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: MarketplaceGalleryImagesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property + * in the response to get the next page of marketplace gallery images. + * @param options The options parameters. + */ + public listAll( + options?: MarketplaceGalleryImagesListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAllPagingPage(options, settings); + } + }; + } + + private async *listAllPagingPage( + options?: MarketplaceGalleryImagesListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: MarketplaceGalleryImagesListAllResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAll(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAllPagingAll( + options?: MarketplaceGalleryImagesListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a marketplace gallery image + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param options The options parameters. + */ + get( + resourceGroupName: string, + marketplaceGalleryImageName: string, + options?: MarketplaceGalleryImagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, marketplaceGalleryImageName, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a marketplace gallery image. Please note some properties can be + * set only during marketplace gallery image creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImages, + options?: MarketplaceGalleryImagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MarketplaceGalleryImagesCreateOrUpdateResponse + > + > { + 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, + marketplaceGalleryImageName, + marketplaceGalleryImages, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MarketplaceGalleryImagesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a marketplace gallery image. Please note some properties can be + * set only during marketplace gallery image creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImages, + options?: MarketplaceGalleryImagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + marketplaceGalleryImageName, + marketplaceGalleryImages, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + marketplaceGalleryImageName: string, + options?: MarketplaceGalleryImagesDeleteOptionalParams + ): 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, marketplaceGalleryImageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + marketplaceGalleryImageName: string, + options?: MarketplaceGalleryImagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + marketplaceGalleryImageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImagesUpdateRequest, + options?: MarketplaceGalleryImagesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MarketplaceGalleryImagesUpdateResponse + > + > { + 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, + marketplaceGalleryImageName, + marketplaceGalleryImages, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + MarketplaceGalleryImagesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImagesUpdateRequest, + options?: MarketplaceGalleryImagesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + marketplaceGalleryImageName, + marketplaceGalleryImages, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink + * property in the response to get the next page of marketplace gallery images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: MarketplaceGalleryImagesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property + * in the response to get the next page of marketplace gallery images. + * @param options The options parameters. + */ + private _listAll( + options?: MarketplaceGalleryImagesListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: MarketplaceGalleryImagesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. + */ + private _listAllNext( + nextLink: string, + options?: MarketplaceGalleryImagesListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.marketplaceGalleryImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + 201: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + 202: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + 204: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.marketplaceGalleryImages, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.marketplaceGalleryImageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.marketplaceGalleryImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + 201: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + 202: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + 204: { + bodyMapper: Mappers.MarketplaceGalleryImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.marketplaceGalleryImages1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.marketplaceGalleryImageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MarketplaceGalleryImagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/networkInterfacesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/networkInterfacesOperations.ts new file mode 100644 index 000000000000..39c115c7f408 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/networkInterfacesOperations.ts @@ -0,0 +1,727 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkInterfacesOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkInterfaces, + NetworkInterfacesListNextOptionalParams, + NetworkInterfacesListOptionalParams, + NetworkInterfacesListResponse, + NetworkInterfacesListAllNextOptionalParams, + NetworkInterfacesListAllOptionalParams, + NetworkInterfacesListAllResponse, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesGetResponse, + NetworkInterfacesCreateOrUpdateOptionalParams, + NetworkInterfacesCreateOrUpdateResponse, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesUpdateRequest, + NetworkInterfacesUpdateOptionalParams, + NetworkInterfacesUpdateResponse, + NetworkInterfacesListNextResponse, + NetworkInterfacesListAllNextResponse +} from "../models"; + +/// +/** Class containing NetworkInterfacesOperations operations. */ +export class NetworkInterfacesOperationsImpl + implements NetworkInterfacesOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class NetworkInterfacesOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the network interfaces in the specified resource group. Use the nextLink property in + * the response to get the next page of network interfaces. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: NetworkInterfacesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: NetworkInterfacesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkInterfacesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: NetworkInterfacesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the + * response to get the next page of network interfaces. + * @param options The options parameters. + */ + public listAll( + options?: NetworkInterfacesListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAllPagingPage(options, settings); + } + }; + } + + private async *listAllPagingPage( + options?: NetworkInterfacesListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkInterfacesListAllResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAll(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAllPagingAll( + options?: NetworkInterfacesListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a network interface + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkInterfaceName, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a network interface. Please note some properties can be set only + * during network interface creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfaces, + options?: NetworkInterfacesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesCreateOrUpdateResponse + > + > { + 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, + networkInterfaceName, + networkInterfaces, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + NetworkInterfacesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a network interface. Please note some properties can be set only + * during network interface creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfaces, + options?: NetworkInterfacesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + networkInterfaceName, + networkInterfaces, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): 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, networkInterfaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkInterfaceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfacesUpdateRequest, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesUpdateResponse + > + > { + 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, + networkInterfaceName, + networkInterfaces, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkInterfacesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfacesUpdateRequest, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + networkInterfaceName, + networkInterfaces, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all of the network interfaces in the specified resource group. Use the nextLink property in + * the response to get the next page of network interfaces. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: NetworkInterfacesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the + * response to get the next page of network interfaces. + * @param options The options parameters. + */ + private _listAll( + options?: NetworkInterfacesListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: NetworkInterfacesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. + */ + private _listAllNext( + nextLink: string, + options?: NetworkInterfacesListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfaces + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfaces + }, + 201: { + bodyMapper: Mappers.NetworkInterfaces + }, + 202: { + bodyMapper: Mappers.NetworkInterfaces + }, + 204: { + bodyMapper: Mappers.NetworkInterfaces + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.networkInterfaces, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfaces + }, + 201: { + bodyMapper: Mappers.NetworkInterfaces + }, + 202: { + bodyMapper: Mappers.NetworkInterfaces + }, + 204: { + bodyMapper: Mappers.NetworkInterfaces + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.networkInterfaces1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/networkInterfaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts index 8a7c9440c8e4..e05e019018ad 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/operations.ts @@ -6,16 +6,22 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Operations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureStackHCIClient } from "../azureStackHCIClient"; import { + Operation, + OperationsListNextOptionalParams, OperationsListOptionalParams, - OperationsListResponse + OperationsListResponse, + OperationsListNextResponse } from "../models"; +/// /** Class containing Operations operations. */ export class OperationsImpl implements Operations { private readonly client: AzureStackHCIClient; @@ -29,14 +35,83 @@ export class OperationsImpl implements Operations { } /** - * List all available Microsoft.AzureStackHCI provider operations + * List all the supported operations. * @param options The options parameters. */ - list( + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List all the supported operations. + * @param options The options parameters. + */ + private _list( options?: OperationsListOptionalParams ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -57,3 +132,18 @@ const listOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/storageContainersOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/storageContainersOperations.ts new file mode 100644 index 000000000000..935c70a1ddf0 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/storageContainersOperations.ts @@ -0,0 +1,727 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { StorageContainersOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + StorageContainers, + StorageContainersListNextOptionalParams, + StorageContainersListOptionalParams, + StorageContainersListResponse, + StorageContainersListAllNextOptionalParams, + StorageContainersListAllOptionalParams, + StorageContainersListAllResponse, + StorageContainersGetOptionalParams, + StorageContainersGetResponse, + StorageContainersCreateOrUpdateOptionalParams, + StorageContainersCreateOrUpdateResponse, + StorageContainersDeleteOptionalParams, + StorageContainersUpdateRequest, + StorageContainersUpdateOptionalParams, + StorageContainersUpdateResponse, + StorageContainersListNextResponse, + StorageContainersListAllNextResponse +} from "../models"; + +/// +/** Class containing StorageContainersOperations operations. */ +export class StorageContainersOperationsImpl + implements StorageContainersOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class StorageContainersOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the storage containers in the specified resource group. Use the nextLink property in + * the response to get the next page of storage containers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: StorageContainersListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: StorageContainersListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: StorageContainersListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: StorageContainersListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the storage containers in the specified subscription. Use the nextLink property in the + * response to get the next page of storage containers. + * @param options The options parameters. + */ + public listAll( + options?: StorageContainersListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAllPagingPage(options, settings); + } + }; + } + + private async *listAllPagingPage( + options?: StorageContainersListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: StorageContainersListAllResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAll(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAllPagingAll( + options?: StorageContainersListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a storage container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param options The options parameters. + */ + get( + resourceGroupName: string, + storageContainerName: string, + options?: StorageContainersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, storageContainerName, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a storage container. Please note some properties can be set only + * during storage container creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainers, + options?: StorageContainersCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + StorageContainersCreateOrUpdateResponse + > + > { + 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, + storageContainerName, + storageContainers, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + StorageContainersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a storage container. Please note some properties can be set only + * during storage container creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainers, + options?: StorageContainersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + storageContainerName, + storageContainers, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + storageContainerName: string, + options?: StorageContainersDeleteOptionalParams + ): 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, storageContainerName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + storageContainerName: string, + options?: StorageContainersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + storageContainerName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainersUpdateRequest, + options?: StorageContainersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + StorageContainersUpdateResponse + > + > { + 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, + storageContainerName, + storageContainers, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + StorageContainersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainersUpdateRequest, + options?: StorageContainersUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + storageContainerName, + storageContainers, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all of the storage containers in the specified resource group. Use the nextLink property in + * the response to get the next page of storage containers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: StorageContainersListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Lists all of the storage containers in the specified subscription. Use the nextLink property in the + * response to get the next page of storage containers. + * @param options The options parameters. + */ + private _listAll( + options?: StorageContainersListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: StorageContainersListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. + */ + private _listAllNext( + nextLink: string, + options?: StorageContainersListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StorageContainers + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageContainerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.StorageContainers + }, + 201: { + bodyMapper: Mappers.StorageContainers + }, + 202: { + bodyMapper: Mappers.StorageContainers + }, + 204: { + bodyMapper: Mappers.StorageContainers + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.storageContainers, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageContainerName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageContainerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.StorageContainers + }, + 201: { + bodyMapper: Mappers.StorageContainers + }, + 202: { + bodyMapper: Mappers.StorageContainers + }, + 204: { + bodyMapper: Mappers.StorageContainers + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.storageContainers1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageContainerName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StorageContainersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/storageContainers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StorageContainersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StorageContainersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StorageContainersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualHardDisksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualHardDisksOperations.ts new file mode 100644 index 000000000000..d652a0f289b8 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualHardDisksOperations.ts @@ -0,0 +1,727 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VirtualHardDisksOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VirtualHardDisks, + VirtualHardDisksListNextOptionalParams, + VirtualHardDisksListOptionalParams, + VirtualHardDisksListResponse, + VirtualHardDisksListAllNextOptionalParams, + VirtualHardDisksListAllOptionalParams, + VirtualHardDisksListAllResponse, + VirtualHardDisksGetOptionalParams, + VirtualHardDisksGetResponse, + VirtualHardDisksCreateOrUpdateOptionalParams, + VirtualHardDisksCreateOrUpdateResponse, + VirtualHardDisksDeleteOptionalParams, + VirtualHardDisksUpdateRequest, + VirtualHardDisksUpdateOptionalParams, + VirtualHardDisksUpdateResponse, + VirtualHardDisksListNextResponse, + VirtualHardDisksListAllNextResponse +} from "../models"; + +/// +/** Class containing VirtualHardDisksOperations operations. */ +export class VirtualHardDisksOperationsImpl + implements VirtualHardDisksOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class VirtualHardDisksOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in + * the response to get the next page of virtual hard disks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualHardDisksListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual hard disks. + * @param options The options parameters. + */ + public listAll( + options?: VirtualHardDisksListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAllPagingPage(options, settings); + } + }; + } + + private async *listAllPagingPage( + options?: VirtualHardDisksListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualHardDisksListAllResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAll(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAllPagingAll( + options?: VirtualHardDisksListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a virtual hard disk + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param options The options parameters. + */ + get( + resourceGroupName: string, + virtualHardDiskName: string, + options?: VirtualHardDisksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualHardDiskName, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a virtual hard disk. Please note some properties can be set only + * during virtual hard disk creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisks, + options?: VirtualHardDisksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualHardDisksCreateOrUpdateResponse + > + > { + 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, + virtualHardDiskName, + virtualHardDisks, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualHardDisksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a virtual hard disk. Please note some properties can be set only + * during virtual hard disk creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisks, + options?: VirtualHardDisksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + virtualHardDiskName, + virtualHardDisks, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + virtualHardDiskName: string, + options?: VirtualHardDisksDeleteOptionalParams + ): 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, virtualHardDiskName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + virtualHardDiskName: string, + options?: VirtualHardDisksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + virtualHardDiskName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisksUpdateRequest, + options?: VirtualHardDisksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualHardDisksUpdateResponse + > + > { + 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, + virtualHardDiskName, + virtualHardDisks, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualHardDisksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisksUpdateRequest, + options?: VirtualHardDisksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + virtualHardDiskName, + virtualHardDisks, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in + * the response to get the next page of virtual hard disks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual hard disks. + * @param options The options parameters. + */ + private _listAll( + options?: VirtualHardDisksListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: VirtualHardDisksListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. + */ + private _listAllNext( + nextLink: string, + options?: VirtualHardDisksListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualHardDiskName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisks + }, + 201: { + bodyMapper: Mappers.VirtualHardDisks + }, + 202: { + bodyMapper: Mappers.VirtualHardDisks + }, + 204: { + bodyMapper: Mappers.VirtualHardDisks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualHardDisks, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualHardDiskName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualHardDiskName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisks + }, + 201: { + bodyMapper: Mappers.VirtualHardDisks + }, + 202: { + bodyMapper: Mappers.VirtualHardDisks + }, + 204: { + bodyMapper: Mappers.VirtualHardDisks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualHardDisks1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualHardDiskName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualHardDisks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualHardDisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualMachineInstances.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualMachineInstances.ts new file mode 100644 index 000000000000..cf93fd210274 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualMachineInstances.ts @@ -0,0 +1,910 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VirtualMachineInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListNextOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesListResponse, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstanceUpdateRequest, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse, + VirtualMachineInstancesListNextResponse +} from "../models"; + +/// +/** Class containing VirtualMachineInstances operations. */ +export class VirtualMachineInstancesImpl implements VirtualMachineInstances { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class VirtualMachineInstances class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualMachineInstancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Gets a virtual machine instance + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstance, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + > { + 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: { resourceUri, virtualMachineInstance, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstance, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceUri, + virtualMachineInstance, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + > { + 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: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstanceUpdateRequest, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + > { + 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: { resourceUri, virtualMachineInstance, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstanceUpdateRequest, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceUri, + virtualMachineInstance, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + > { + 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: { resourceUri, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise { + const poller = await this.beginStart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to stop a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + > { + 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: { resourceUri, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to stop a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise { + const poller = await this.beginStop(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + > { + 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: { resourceUri, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesRestartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VirtualMachineInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualMachineInstance, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualMachineInstance1, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/stop", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/restart", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualNetworksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualNetworksOperations.ts new file mode 100644 index 000000000000..39acf6918124 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualNetworksOperations.ts @@ -0,0 +1,716 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VirtualNetworksOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VirtualNetworks, + VirtualNetworksListNextOptionalParams, + VirtualNetworksListOptionalParams, + VirtualNetworksListResponse, + VirtualNetworksListAllNextOptionalParams, + VirtualNetworksListAllOptionalParams, + VirtualNetworksListAllResponse, + VirtualNetworksGetOptionalParams, + VirtualNetworksGetResponse, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksCreateOrUpdateResponse, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateRequest, + VirtualNetworksUpdateOptionalParams, + VirtualNetworksUpdateResponse, + VirtualNetworksListNextResponse, + VirtualNetworksListAllNextResponse +} from "../models"; + +/// +/** Class containing VirtualNetworksOperations operations. */ +export class VirtualNetworksOperationsImpl + implements VirtualNetworksOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class VirtualNetworksOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the + * response to get the next page of virtual networks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: VirtualNetworksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: VirtualNetworksListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualNetworksListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: VirtualNetworksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual networks. + * @param options The options parameters. + */ + public listAll( + options?: VirtualNetworksListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAllPagingPage(options, settings); + } + }; + } + + private async *listAllPagingPage( + options?: VirtualNetworksListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualNetworksListAllResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAll(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAllPagingAll( + options?: VirtualNetworksListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param options The options parameters. + */ + get( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualNetworkName, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only + * during virtual network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworks, + options?: VirtualNetworksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksCreateOrUpdateResponse + > + > { + 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, virtualNetworkName, virtualNetworks, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only + * during virtual network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworks, + options?: VirtualNetworksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + virtualNetworkName, + virtualNetworks, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams + ): 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, virtualNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + virtualNetworkName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworksUpdateRequest, + options?: VirtualNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksUpdateResponse + > + > { + 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, virtualNetworkName, virtualNetworks, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworksUpdateRequest, + options?: VirtualNetworksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + virtualNetworkName, + virtualNetworks, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the + * response to get the next page of virtual networks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: VirtualNetworksListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual networks. + * @param options The options parameters. + */ + private _listAll( + options?: VirtualNetworksListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: VirtualNetworksListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. + */ + private _listAllNext( + nextLink: string, + options?: VirtualNetworksListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworks + }, + 201: { + bodyMapper: Mappers.VirtualNetworks + }, + 202: { + bodyMapper: Mappers.VirtualNetworks + }, + 204: { + bodyMapper: Mappers.VirtualNetworks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualNetworks, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworks + }, + 201: { + bodyMapper: Mappers.VirtualNetworks + }, + 202: { + bodyMapper: Mappers.VirtualNetworks + }, + 204: { + bodyMapper: Mappers.VirtualNetworks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualNetworks1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualNetworkName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualNetworks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAllNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts deleted file mode 100644 index f6625f9cf045..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - ArcSetting, - ArcSettingsListByClusterOptionalParams, - ArcSettingsGetOptionalParams, - ArcSettingsGetResponse, - ArcSettingsCreateOptionalParams, - ArcSettingsCreateResponse, - ArcSettingsPatch, - ArcSettingsUpdateOptionalParams, - ArcSettingsUpdateResponse, - ArcSettingsDeleteOptionalParams, - ArcSettingsGeneratePasswordOptionalParams, - ArcSettingsGeneratePasswordResponse, - ArcSettingsCreateIdentityOptionalParams, - ArcSettingsCreateIdentityResponse -} from "../models"; - -/// -/** Interface representing a ArcSettings. */ -export interface ArcSettings { - /** - * Get ArcSetting resources of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - listByCluster( - resourceGroupName: string, - clusterName: string, - options?: ArcSettingsListByClusterOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get ArcSetting resource details of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsGetOptionalParams - ): Promise; - /** - * Create ArcSetting for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - arcSetting: ArcSetting, - options?: ArcSettingsCreateOptionalParams - ): Promise; - /** - * Update ArcSettings for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param arcSetting ArcSettings parameters that needs to be updated - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - arcSetting: ArcSettingsPatch, - options?: ArcSettingsUpdateOptionalParams - ): Promise; - /** - * Delete ArcSetting resource details of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsDeleteOptionalParams - ): Promise, void>>; - /** - * Delete ArcSetting resource details of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsDeleteOptionalParams - ): Promise; - /** - * Generate password for arc settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - generatePassword( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsGeneratePasswordOptionalParams - ): Promise; - /** - * Create Aad identity for arc settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - beginCreateIdentity( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsCreateIdentityOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ArcSettingsCreateIdentityResponse - > - >; - /** - * Create Aad identity for arc settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - beginCreateIdentityAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ArcSettingsCreateIdentityOptionalParams - ): Promise; -} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts deleted file mode 100644 index 572953e118c3..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - Cluster, - ClustersListBySubscriptionOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOptionalParams, - ClustersCreateResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - UploadCertificateRequest, - ClustersUploadCertificateOptionalParams, - ClustersCreateIdentityOptionalParams, - ClustersCreateIdentityResponse -} from "../models"; - -/// -/** Interface representing a Clusters. */ -export interface Clusters { - /** - * List all HCI clusters in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ClustersListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * List all HCI clusters in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams - ): Promise; - /** - * Create an HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOptionalParams - ): Promise; - /** - * Update an HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - cluster: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise; - /** - * Delete an HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise, void>>; - /** - * Delete an HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise; - /** - * Upload certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param uploadCertificateRequest Upload certificate request. - * @param options The options parameters. - */ - beginUploadCertificate( - resourceGroupName: string, - clusterName: string, - uploadCertificateRequest: UploadCertificateRequest, - options?: ClustersUploadCertificateOptionalParams - ): Promise, void>>; - /** - * Upload certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param uploadCertificateRequest Upload certificate request. - * @param options The options parameters. - */ - beginUploadCertificateAndWait( - resourceGroupName: string, - clusterName: string, - uploadCertificateRequest: UploadCertificateRequest, - options?: ClustersUploadCertificateOptionalParams - ): Promise; - /** - * Create cluster identity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginCreateIdentity( - resourceGroupName: string, - clusterName: string, - options?: ClustersCreateIdentityOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ClustersCreateIdentityResponse - > - >; - /** - * Create cluster identity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginCreateIdentityAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersCreateIdentityOptionalParams - ): Promise; -} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.ts deleted file mode 100644 index 22c2192cc9af..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - Extension, - ExtensionsListByArcSettingOptionalParams, - ExtensionsGetOptionalParams, - ExtensionsGetResponse, - ExtensionsCreateOptionalParams, - ExtensionsCreateResponse, - ExtensionsUpdateOptionalParams, - ExtensionsUpdateResponse, - ExtensionsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a Extensions. */ -export interface Extensions { - /** - * List all Extensions under ArcSetting resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param options The options parameters. - */ - listByArcSetting( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ExtensionsListByArcSettingOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get particular Arc Extension of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - options?: ExtensionsGetOptionalParams - ): Promise; - /** - * Create Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ExtensionsCreateResponse - > - >; - /** - * Create Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsCreateOptionalParams - ): Promise; - /** - * Update Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ExtensionsUpdateResponse - > - >; - /** - * Update Extension for HCI cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param extension Details of the Machine Extension to be created. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - extension: Extension, - options?: ExtensionsUpdateOptionalParams - ): Promise; - /** - * Delete particular Arc Extension of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - options?: ExtensionsDeleteOptionalParams - ): Promise, void>>; - /** - * Delete particular Arc Extension of HCI Cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - extensionName: string, - options?: ExtensionsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/galleryImagesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/galleryImagesOperations.ts new file mode 100644 index 000000000000..49d7a7df55ca --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/galleryImagesOperations.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GalleryImages, + GalleryImagesListOptionalParams, + GalleryImagesListAllOptionalParams, + GalleryImagesGetOptionalParams, + GalleryImagesGetResponse, + GalleryImagesCreateOrUpdateOptionalParams, + GalleryImagesCreateOrUpdateResponse, + GalleryImagesDeleteOptionalParams, + GalleryImagesUpdateRequest, + GalleryImagesUpdateOptionalParams, + GalleryImagesUpdateResponse +} from "../models"; + +/// +/** Interface representing a GalleryImagesOperations. */ +export interface GalleryImagesOperations { + /** + * Lists all of the gallery images in the specified resource group. Use the nextLink property in the + * response to get the next page of gallery images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the gallery images in the specified subscription. Use the nextLink property in the + * response to get the next page of gallery images. + * @param options The options parameters. + */ + listAll( + options?: GalleryImagesListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a gallery image + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryImageName: string, + options?: GalleryImagesGetOptionalParams + ): Promise; + /** + * The operation to create or update a gallery image. Please note some properties can be set only + * during gallery image creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImages, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GalleryImagesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a gallery image. Please note some properties can be set only + * during gallery image creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImages, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): Promise; + /** + * The operation to update a gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImagesUpdateRequest, + options?: GalleryImagesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GalleryImagesUpdateResponse + > + >; + /** + * The operation to update a gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryImageName Name of the gallery image + * @param galleryImages The gallery images resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImagesUpdateRequest, + options?: GalleryImagesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/guestAgentOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/guestAgentOperations.ts new file mode 100644 index 000000000000..eb24e6e0778d --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/guestAgentOperations.ts @@ -0,0 +1,81 @@ +/* + * 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 { + GuestAgentCreateOptionalParams, + GuestAgentCreateResponse, + GuestAgentGetOptionalParams, + GuestAgentGetResponse, + GuestAgentDeleteOptionalParams, + GuestAgentDeleteResponse +} from "../models"; + +/** Interface representing a GuestAgentOperations. */ +export interface GuestAgentOperations { + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreate( + resourceUri: string, + options?: GuestAgentCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GuestAgentCreateResponse + > + >; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceUri: string, + options?: GuestAgentCreateOptionalParams + ): Promise; + /** + * Implements GuestAgent GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: GuestAgentGetOptionalParams + ): Promise; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: GuestAgentDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GuestAgentDeleteResponse + > + >; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: GuestAgentDeleteOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/guestAgents.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/guestAgents.ts new file mode 100644 index 000000000000..322edfdf9da9 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/guestAgents.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { GuestAgent, GuestAgentsListOptionalParams } from "../models"; + +/// +/** Interface representing a GuestAgents. */ +export interface GuestAgents { + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: GuestAgentsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/hybridIdentityMetadataOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/hybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..8d861f96cb52 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/hybridIdentityMetadataOperations.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + HybridIdentityMetadata, + HybridIdentityMetadataListOptionalParams, + HybridIdentityMetadataGetOptionalParams, + HybridIdentityMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a HybridIdentityMetadataOperations. */ +export interface HybridIdentityMetadataOperations { + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: HybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: HybridIdentityMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts index 2d20c6edaf47..b7aa517f2268 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts @@ -6,7 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./arcSettings"; -export * from "./clusters"; -export * from "./extensions"; +export * from "./galleryImagesOperations"; export * from "./operations"; +export * from "./marketplaceGalleryImagesOperations"; +export * from "./networkInterfacesOperations"; +export * from "./storageContainersOperations"; +export * from "./virtualHardDisksOperations"; +export * from "./virtualMachineInstances"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./guestAgentOperations"; +export * from "./guestAgents"; +export * from "./virtualNetworksOperations"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/marketplaceGalleryImagesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/marketplaceGalleryImagesOperations.ts new file mode 100644 index 000000000000..4944c6594e66 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/marketplaceGalleryImagesOperations.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + MarketplaceGalleryImages, + MarketplaceGalleryImagesListOptionalParams, + MarketplaceGalleryImagesListAllOptionalParams, + MarketplaceGalleryImagesGetOptionalParams, + MarketplaceGalleryImagesGetResponse, + MarketplaceGalleryImagesCreateOrUpdateOptionalParams, + MarketplaceGalleryImagesCreateOrUpdateResponse, + MarketplaceGalleryImagesDeleteOptionalParams, + MarketplaceGalleryImagesUpdateRequest, + MarketplaceGalleryImagesUpdateOptionalParams, + MarketplaceGalleryImagesUpdateResponse +} from "../models"; + +/// +/** Interface representing a MarketplaceGalleryImagesOperations. */ +export interface MarketplaceGalleryImagesOperations { + /** + * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink + * property in the response to get the next page of marketplace gallery images. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: MarketplaceGalleryImagesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property + * in the response to get the next page of marketplace gallery images. + * @param options The options parameters. + */ + listAll( + options?: MarketplaceGalleryImagesListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a marketplace gallery image + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param options The options parameters. + */ + get( + resourceGroupName: string, + marketplaceGalleryImageName: string, + options?: MarketplaceGalleryImagesGetOptionalParams + ): Promise; + /** + * The operation to create or update a marketplace gallery image. Please note some properties can be + * set only during marketplace gallery image creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImages, + options?: MarketplaceGalleryImagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MarketplaceGalleryImagesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a marketplace gallery image. Please note some properties can be + * set only during marketplace gallery image creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImages, + options?: MarketplaceGalleryImagesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + marketplaceGalleryImageName: string, + options?: MarketplaceGalleryImagesDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + marketplaceGalleryImageName: string, + options?: MarketplaceGalleryImagesDeleteOptionalParams + ): Promise; + /** + * The operation to update a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImagesUpdateRequest, + options?: MarketplaceGalleryImagesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MarketplaceGalleryImagesUpdateResponse + > + >; + /** + * The operation to update a marketplace gallery image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param marketplaceGalleryImageName Name of the marketplace gallery image + * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + marketplaceGalleryImageName: string, + marketplaceGalleryImages: MarketplaceGalleryImagesUpdateRequest, + options?: MarketplaceGalleryImagesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/networkInterfacesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/networkInterfacesOperations.ts new file mode 100644 index 000000000000..22bf84bbd619 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/networkInterfacesOperations.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkInterfaces, + NetworkInterfacesListOptionalParams, + NetworkInterfacesListAllOptionalParams, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesGetResponse, + NetworkInterfacesCreateOrUpdateOptionalParams, + NetworkInterfacesCreateOrUpdateResponse, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesUpdateRequest, + NetworkInterfacesUpdateOptionalParams, + NetworkInterfacesUpdateResponse +} from "../models"; + +/// +/** Interface representing a NetworkInterfacesOperations. */ +export interface NetworkInterfacesOperations { + /** + * Lists all of the network interfaces in the specified resource group. Use the nextLink property in + * the response to get the next page of network interfaces. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: NetworkInterfacesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the + * response to get the next page of network interfaces. + * @param options The options parameters. + */ + listAll( + options?: NetworkInterfacesListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a network interface + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetOptionalParams + ): Promise; + /** + * The operation to create or update a network interface. Please note some properties can be set only + * during network interface creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfaces, + options?: NetworkInterfacesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a network interface. Please note some properties can be set only + * during network interface creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfaces, + options?: NetworkInterfacesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise; + /** + * The operation to update a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfacesUpdateRequest, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesUpdateResponse + > + >; + /** + * The operation to update a network interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkInterfaceName Name of the network interface + * @param networkInterfaces The network interface resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + networkInterfaceName: string, + networkInterfaces: NetworkInterfacesUpdateRequest, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/operations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/operations.ts index 706ea219c720..f528bd71d702 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/operations.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/operations.ts @@ -6,16 +6,17 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { - OperationsListOptionalParams, - OperationsListResponse -} from "../models"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; +/// /** Interface representing a Operations. */ export interface Operations { /** - * List all available Microsoft.AzureStackHCI provider operations + * List all the supported operations. * @param options The options parameters. */ - list(options?: OperationsListOptionalParams): Promise; + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/storageContainersOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/storageContainersOperations.ts new file mode 100644 index 000000000000..60dbf092a6f9 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/storageContainersOperations.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + StorageContainers, + StorageContainersListOptionalParams, + StorageContainersListAllOptionalParams, + StorageContainersGetOptionalParams, + StorageContainersGetResponse, + StorageContainersCreateOrUpdateOptionalParams, + StorageContainersCreateOrUpdateResponse, + StorageContainersDeleteOptionalParams, + StorageContainersUpdateRequest, + StorageContainersUpdateOptionalParams, + StorageContainersUpdateResponse +} from "../models"; + +/// +/** Interface representing a StorageContainersOperations. */ +export interface StorageContainersOperations { + /** + * Lists all of the storage containers in the specified resource group. Use the nextLink property in + * the response to get the next page of storage containers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: StorageContainersListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the storage containers in the specified subscription. Use the nextLink property in the + * response to get the next page of storage containers. + * @param options The options parameters. + */ + listAll( + options?: StorageContainersListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a storage container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param options The options parameters. + */ + get( + resourceGroupName: string, + storageContainerName: string, + options?: StorageContainersGetOptionalParams + ): Promise; + /** + * The operation to create or update a storage container. Please note some properties can be set only + * during storage container creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainers, + options?: StorageContainersCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + StorageContainersCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a storage container. Please note some properties can be set only + * during storage container creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainers, + options?: StorageContainersCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + storageContainerName: string, + options?: StorageContainersDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + storageContainerName: string, + options?: StorageContainersDeleteOptionalParams + ): Promise; + /** + * The operation to update a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainersUpdateRequest, + options?: StorageContainersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + StorageContainersUpdateResponse + > + >; + /** + * The operation to update a storage container. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageContainerName Name of the storage container + * @param storageContainers The storage container resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + storageContainerName: string, + storageContainers: StorageContainersUpdateRequest, + options?: StorageContainersUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualHardDisksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualHardDisksOperations.ts new file mode 100644 index 000000000000..0e33687e390c --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualHardDisksOperations.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VirtualHardDisks, + VirtualHardDisksListOptionalParams, + VirtualHardDisksListAllOptionalParams, + VirtualHardDisksGetOptionalParams, + VirtualHardDisksGetResponse, + VirtualHardDisksCreateOrUpdateOptionalParams, + VirtualHardDisksCreateOrUpdateResponse, + VirtualHardDisksDeleteOptionalParams, + VirtualHardDisksUpdateRequest, + VirtualHardDisksUpdateOptionalParams, + VirtualHardDisksUpdateResponse +} from "../models"; + +/// +/** Interface representing a VirtualHardDisksOperations. */ +export interface VirtualHardDisksOperations { + /** + * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in + * the response to get the next page of virtual hard disks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual hard disks. + * @param options The options parameters. + */ + listAll( + options?: VirtualHardDisksListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a virtual hard disk + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param options The options parameters. + */ + get( + resourceGroupName: string, + virtualHardDiskName: string, + options?: VirtualHardDisksGetOptionalParams + ): Promise; + /** + * The operation to create or update a virtual hard disk. Please note some properties can be set only + * during virtual hard disk creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisks, + options?: VirtualHardDisksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualHardDisksCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual hard disk. Please note some properties can be set only + * during virtual hard disk creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisks, + options?: VirtualHardDisksCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + virtualHardDiskName: string, + options?: VirtualHardDisksDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + virtualHardDiskName: string, + options?: VirtualHardDisksDeleteOptionalParams + ): Promise; + /** + * The operation to update a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisksUpdateRequest, + options?: VirtualHardDisksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualHardDisksUpdateResponse + > + >; + /** + * The operation to update a virtual hard disk. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisksUpdateRequest, + options?: VirtualHardDisksUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualMachineInstances.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualMachineInstances.ts new file mode 100644 index 000000000000..459086576f60 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualMachineInstances.ts @@ -0,0 +1,214 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstanceUpdateRequest, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineInstances. */ +export interface VirtualMachineInstances { + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a virtual machine instance + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstance, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstance, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + >; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstanceUpdateRequest, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + >; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param virtualMachineInstance The virtual machine instance resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceUri: string, + virtualMachineInstance: VirtualMachineInstanceUpdateRequest, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + >; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise; + /** + * The operation to stop a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + >; + /** + * The operation to stop a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + >; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualNetworksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualNetworksOperations.ts new file mode 100644 index 000000000000..10971135c150 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualNetworksOperations.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VirtualNetworks, + VirtualNetworksListOptionalParams, + VirtualNetworksListAllOptionalParams, + VirtualNetworksGetOptionalParams, + VirtualNetworksGetResponse, + VirtualNetworksCreateOrUpdateOptionalParams, + VirtualNetworksCreateOrUpdateResponse, + VirtualNetworksDeleteOptionalParams, + VirtualNetworksUpdateRequest, + VirtualNetworksUpdateOptionalParams, + VirtualNetworksUpdateResponse +} from "../models"; + +/// +/** Interface representing a VirtualNetworksOperations. */ +export interface VirtualNetworksOperations { + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the + * response to get the next page of virtual networks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: VirtualNetworksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual networks. + * @param options The options parameters. + */ + listAll( + options?: VirtualNetworksListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param options The options parameters. + */ + get( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksGetOptionalParams + ): Promise; + /** + * The operation to create or update a virtual network. Please note some properties can be set only + * during virtual network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworks, + options?: VirtualNetworksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual network. Please note some properties can be set only + * during virtual network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworks, + options?: VirtualNetworksCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + virtualNetworkName: string, + options?: VirtualNetworksDeleteOptionalParams + ): Promise; + /** + * The operation to update a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworksUpdateRequest, + options?: VirtualNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksUpdateResponse + > + >; + /** + * The operation to update a virtual network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network + * @param virtualNetworks The virtual network resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + virtualNetworkName: string, + virtualNetworks: VirtualNetworksUpdateRequest, + options?: VirtualNetworksUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/pagingHelper.ts b/sdk/azurestackhci/arm-azurestackhci/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/pagingHelper.ts +++ b/sdk/azurestackhci/arm-azurestackhci/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/azurestackhci/arm-azurestackhci/tsconfig.json b/sdk/azurestackhci/arm-azurestackhci/tsconfig.json index ebe661af00c2..3e6ae96443f3 100644 --- a/sdk/azurestackhci/arm-azurestackhci/tsconfig.json +++ b/sdk/azurestackhci/arm-azurestackhci/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-azurestackhci": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"