diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 49796f85da59..0dc5004bc892 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1724,6 +1724,16 @@ packages: lodash: 4.17.21 dev: false + /@microsoft/api-extractor-model@7.28.2(@types/node@14.18.63): + resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.61.0(@types/node@14.18.63) + transitivePeerDependencies: + - '@types/node' + dev: false + /@microsoft/api-extractor-model@7.28.2(@types/node@16.18.58): resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} dependencies: @@ -1734,6 +1744,26 @@ packages: - '@types/node' dev: false + /@microsoft/api-extractor@7.38.0(@types/node@14.18.63): + resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.28.2(@types/node@14.18.63) + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.61.0(@types/node@14.18.63) + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.16.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.6 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.0.4 + transitivePeerDependencies: + - '@types/node' + dev: false + /@microsoft/api-extractor@7.38.0(@types/node@16.18.58): resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} hasBin: true @@ -2382,6 +2412,24 @@ packages: rollup: 3.29.4 dev: false + /@rushstack/node-core-library@3.61.0(@types/node@14.18.63): + resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 14.18.63 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.6 + semver: 7.5.4 + z-schema: 5.0.5 + dev: false + /@rushstack/node-core-library@3.61.0(@types/node@16.18.58): resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} peerDependencies: @@ -2689,6 +2737,10 @@ packages: form-data: 4.0.0 dev: false + /@types/node@14.18.63: + resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} + dev: false + /@types/node@16.18.58: resolution: {integrity: sha512-YGncyA25/MaVtQkjWW9r0EFBukZ+JulsLcVZBlGUfIb96OBMjkoRWwQo5IEWJ8Fj06Go3GHw+bjYDitv6BaGsA==} dev: false @@ -3910,7 +3962,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug@3.2.7: @@ -4162,7 +4214,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231009 + typescript: 5.3.0-dev.20231010 dev: false /eastasianwidth@0.2.0: @@ -5174,7 +5226,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -7982,6 +8034,22 @@ packages: resolution: {integrity: sha512-rZqFD43y4U9nSqVq3iyWBiDwmBQJY8Txi04yI9jTKD3xcl7CbFjh1qRpQshUB3sONLubDzm7vJiwB+1MEGv67w==} dev: false + /rollup-plugin-sourcemaps@0.6.3(@types/node@14.18.63)(rollup@2.79.1): + resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} + engines: {node: '>=10.0.0'} + peerDependencies: + '@types/node': '>=10.0.0' + rollup: '>=0.31.2' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@rollup/pluginutils': 3.1.0(rollup@2.79.1) + '@types/node': 14.18.63 + rollup: 2.79.1 + source-map-resolve: 0.6.0 + dev: false + /rollup-plugin-sourcemaps@0.6.3(@types/node@16.18.58)(rollup@2.79.1): resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} engines: {node: '>=10.0.0'} @@ -8715,6 +8783,37 @@ packages: code-block-writer: 12.0.0 dev: false + /ts-node@10.9.1(@types/node@14.18.63)(typescript@5.0.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 14.18.63 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.0.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.1(@types/node@16.18.58)(typescript@5.0.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -8888,8 +8987,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231009: - resolution: {integrity: sha512-0JwLa29peN3wK/3uUMHTr9bzLwJ7BIloeN3JTyHj0aeyoowNMJXjpVMSTu8geVzfP4RPL9vM/7iyVPrPBmLBaQ==} + /typescript@5.3.0-dev.20231010: + resolution: {integrity: sha512-oSO2cE/D2+ju7rRavL4A/j6tP/s3Y4W7lDK81PaW3MEi1HpeXbRLObHcxA7Y9s2QuES/1P/81i/YKdB0kssg6w==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -10768,31 +10867,34 @@ packages: dev: false file:projects/arm-azurestackhci.tgz: - resolution: {integrity: sha512-Blipu/VgxKrSIAjvAnVb42yJR8nB86cVE+9NxMxo0o8TwNckt7Y6q7EeF00p3WjdNhCGDwyc+xnwB/a8AprGnQ==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-OKQIkMkuN/h17iCkuwmg5jp2VPOh2RFBajv+EKXtM9yGgyBXxMO5iQOgDiN6OA38pfSpUQWC8eL0I6hywlVMAQ==, tarball: file:projects/arm-azurestackhci.tgz} name: '@rush-temp/arm-azurestackhci' version: 0.0.0 dependencies: - '@microsoft/api-extractor': 7.38.0(@types/node@16.18.58) + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.38.0(@types/node@14.18.63) '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) '@rollup/plugin-json': 6.0.1(rollup@2.79.1) '@rollup/plugin-multi-entry': 6.0.1(rollup@2.79.1) '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.6 - '@types/node': 16.18.58 + '@types/node': 14.18.63 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 - mocha: 10.2.0 - rimraf: 3.0.2 + dotenv: 16.3.1 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 5.0.5 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.58)(rollup@2.79.1) - ts-node: 10.9.1(@types/node@16.18.58)(typescript@5.0.4) + rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.63)(rollup@2.79.1) + ts-node: 10.9.1(@types/node@14.18.63)(typescript@5.0.4) tslib: 2.6.2 typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - supports-color dev: false file:projects/arm-baremetalinfrastructure.tgz: diff --git a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md index 16ad5fa40c14..8744e85c223e 100644 --- a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md @@ -1,15 +1,314 @@ # Release History + +## 4.0.0-beta.1 (2023-10-10) + +**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 LogicalNetworksOperations + - Added operation group MarketplaceGalleryImagesOperations + - Added operation group NetworkInterfacesOperations + - Added operation group StorageContainersOperations + - Added operation group VirtualHardDisksOperations + - Added operation group VirtualMachineInstances + - 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 IPPool + - Added Interface IPPoolInfo + - Added Interface LogicalNetworkPropertiesDhcpOptions + - Added Interface LogicalNetworks + - Added Interface LogicalNetworksCreateOrUpdateOptionalParams + - Added Interface LogicalNetworksDeleteHeaders + - Added Interface LogicalNetworksDeleteOptionalParams + - Added Interface LogicalNetworksGetOptionalParams + - Added Interface LogicalNetworksListAllNextOptionalParams + - Added Interface LogicalNetworksListAllOptionalParams + - Added Interface LogicalNetworksListNextOptionalParams + - Added Interface LogicalNetworksListOptionalParams + - Added Interface LogicalNetworksListResult + - Added Interface LogicalNetworkStatus + - Added Interface LogicalNetworkStatusProvisioningStatus + - Added Interface LogicalNetworksUpdateHeaders + - Added Interface LogicalNetworksUpdateOptionalParams + - Added Interface LogicalNetworksUpdateRequest + - 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 Route + - Added Interface RouteTable + - 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 Subnet + - Added Interface SubnetPropertiesFormatIpConfigurationReferencesItem + - 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 VirtualMachineConfigAgentInstanceView + - 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 Type Alias CloudInitDataSource + - Added Type Alias DiskFileFormat + - Added Type Alias ExtendedLocationTypes + - Added Type Alias GalleryImagesCreateOrUpdateResponse + - Added Type Alias GalleryImagesDeleteResponse + - 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 IPPoolTypeEnum + - Added Type Alias LogicalNetworksCreateOrUpdateResponse + - Added Type Alias LogicalNetworksDeleteResponse + - Added Type Alias LogicalNetworksGetResponse + - Added Type Alias LogicalNetworksListAllNextResponse + - Added Type Alias LogicalNetworksListAllResponse + - Added Type Alias LogicalNetworksListNextResponse + - Added Type Alias LogicalNetworksListResponse + - Added Type Alias LogicalNetworksUpdateResponse + - Added Type Alias MarketplaceGalleryImagesCreateOrUpdateResponse + - Added Type Alias MarketplaceGalleryImagesDeleteResponse + - 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 NetworkInterfacesDeleteResponse + - 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 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 StorageContainersDeleteResponse + - 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 VirtualHardDisksDeleteResponse + - 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 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 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** @@ -91,4 +390,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). 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..1022f1b54c27 100644 --- a/sdk/azurestackhci/arm-azurestackhci/_meta.json +++ b/sdk/azurestackhci/arm-azurestackhci/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "b3d7d5cd1e716ca74947a63b2fdd236ad07f834a", "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.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/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.2", + "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 052ae3312b93..3c033f839c29 100644 --- a/sdk/azurestackhci/arm-azurestackhci/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureStackHCIClient.", - "version": "3.1.1", + "version": "4.0.0-beta.1", "engines": { - "node": ">=16.0.0" + "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", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -33,24 +33,24 @@ "@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", - "@azure/identity": "^3.3.0", + "rimraf": "^5.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", - "mocha": "^10.0.0", + "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@types/node": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "@types/node": "^14.0.0", + "ts-node": "^10.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" @@ -84,7 +84,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,12 +112,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..e8d3925c3516 100644 --- a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md +++ b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md @@ -6,450 +6,468 @@ 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) + logicalNetworksOperations: LogicalNetworksOperations; // (undocumented) - arcApplicationClientId?: string; + marketplaceGalleryImagesOperations: MarketplaceGalleryImagesOperations; // (undocumented) - arcApplicationObjectId?: string; + networkInterfacesOperations: NetworkInterfacesOperations; // (undocumented) - arcApplicationTenantId?: string; + operations: Operations; + // (undocumented) + storageContainersOperations: StorageContainersOperations; + // (undocumented) + subscriptionId?: string; + // (undocumented) + virtualHardDisksOperations: VirtualHardDisksOperations; // (undocumented) - arcServicePrincipalObjectId?: string; + virtualMachineInstances: VirtualMachineInstances; } // @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 type CreatedByType = string; + +// @public +export type DiskFileFormat = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: 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 ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; } // @public -export interface ArcSettingsCreateIdentityOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +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 ArcSettingsCreateOptionalParams extends coreClient.OperationOptions { +export interface GalleryDiskImage { + readonly sizeInMB?: number; } // @public -export type ArcSettingsCreateResponse = ArcSetting; +export interface GalleryImageIdentifier { + offer: string; + publisher: string; + sku: string; +} + +// @public +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 interface GalleryImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ArcSettingsGeneratePasswordResponse = PasswordCredential; +export type GalleryImagesDeleteResponse = GalleryImagesDeleteHeaders; // @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, GalleryImagesDeleteResponse>>; + 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; + 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 { + httpProxy?: string; + httpsProxy?: string; + noProxy?: string[]; + trustedCa?: 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; +export interface IPConfigurationProperties { + readonly gateway?: string; + readonly prefixLength?: string; + privateIPAddress?: string; + subnet?: IPConfigurationPropertiesSubnet; +} // @public -export function getContinuationToken(page: unknown): string | undefined; +export interface IPConfigurationPropertiesSubnet { + id?: string; +} + +// @public (undocumented) +export interface IPPool { + end?: string; + // (undocumented) + info?: IPPoolInfo; + ipPoolType?: IPPoolTypeEnum; + name?: string; + start?: string; +} + +// @public (undocumented) +export interface IPPoolInfo { + readonly available?: string; + readonly used?: string; +} // @public -export type ImdsAttestation = string; +export type IPPoolTypeEnum = "vm" | "vippool"; // @public export enum KnownActionType { @@ -457,22 +475,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 +489,26 @@ export enum KnownCreatedByType { } // @public -export enum KnownDiagnosticLevel { - Basic = "Basic", - Enhanced = "Enhanced", - Off = "Off" -} - -// @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 KnownDiskFileFormat { + Vhd = "vhd", + Vhdx = "vhdx" } // @public -export enum KnownImdsAttestation { - Disabled = "Disabled", - Enabled = "Enabled" +export enum KnownExtendedLocationTypes { + CustomLocation = "CustomLocation" } // @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 KnownHyperVGeneration { + V1 = "V1", + V2 = "V2" } // @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 KnownIpAllocationMethodEnum { + Dynamic = "Dynamic", + Static = "Static" } // @public @@ -555,121 +519,782 @@ 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", - Error = "Error", - NotConnectedRecently = "NotConnectedRecently", - NotYetRegistered = "NotYetRegistered" + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" } // @public -export enum KnownWindowsServerSubscription { - Disabled = "Disabled", - Enabled = "Enabled" +export enum KnownStatusLevelTypes { + Error = "Error", + Info = "Info", + Warning = "Warning" } // @public -export type NodeArcState = string; +export enum KnownStatusTypes { + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} // @public -export type NodeExtensionState = 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 Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; +export interface LogicalNetworkPropertiesDhcpOptions { + dnsServers?: string[]; } // @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; +export interface LogicalNetworks extends TrackedResource { + dhcpOptions?: LogicalNetworkPropertiesDhcpOptions; + extendedLocation?: ExtendedLocation; + readonly provisioningState?: ProvisioningStateEnum; + readonly status?: LogicalNetworkStatus; + subnets?: Subnet[]; + vmSwitchName?: string; } // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; +export interface LogicalNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface Operations { - list(options?: OperationsListOptionalParams): Promise; +export type LogicalNetworksCreateOrUpdateResponse = LogicalNetworks; + +// @public +export interface LogicalNetworksDeleteHeaders { + // (undocumented) + location?: string; } // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface LogicalNetworksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type OperationsListResponse = OperationListResult; +export type LogicalNetworksDeleteResponse = LogicalNetworksDeleteHeaders; // @public -export type Origin = string; +export interface LogicalNetworksGetOptionalParams extends coreClient.OperationOptions { +} -// @public (undocumented) -export interface PasswordCredential { - // (undocumented) - endDateTime?: Date; - // (undocumented) - keyId?: string; - // (undocumented) - secretText?: string; - // (undocumented) - startDateTime?: Date; +// @public +export type LogicalNetworksGetResponse = LogicalNetworks; + +// @public +export interface LogicalNetworksListAllNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface PerNodeExtensionState { - readonly extension?: string; - readonly name?: string; - readonly state?: NodeExtensionState; +export type LogicalNetworksListAllNextResponse = LogicalNetworksListResult; + +// @public +export interface LogicalNetworksListAllOptionalParams extends coreClient.OperationOptions { } // @public -export interface PerNodeState { - readonly arcInstance?: string; - readonly name?: string; - readonly state?: NodeArcState; +export type LogicalNetworksListAllResponse = LogicalNetworksListResult; + +// @public +export interface LogicalNetworksListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ProvisioningState = string; +export type LogicalNetworksListNextResponse = LogicalNetworksListResult; // @public -export interface ProxyResource extends Resource { +export interface LogicalNetworksListOptionalParams extends coreClient.OperationOptions { } +// @public +export type LogicalNetworksListResponse = LogicalNetworksListResult; + // @public (undocumented) -export interface RawCertificateData { +export interface LogicalNetworksListResult { + // (undocumented) + nextLink?: string; // (undocumented) - certificates?: string[]; + value?: LogicalNetworks[]; } // @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly type?: string; +export interface LogicalNetworksOperations { + beginCreateOrUpdate(resourceGroupName: string, logicalNetworkName: string, logicalNetworks: LogicalNetworks, options?: LogicalNetworksCreateOrUpdateOptionalParams): Promise, LogicalNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, logicalNetworkName: string, logicalNetworks: LogicalNetworks, options?: LogicalNetworksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, logicalNetworkName: string, options?: LogicalNetworksDeleteOptionalParams): Promise, LogicalNetworksDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, logicalNetworkName: string, options?: LogicalNetworksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, logicalNetworkName: string, logicalNetworks: LogicalNetworksUpdateRequest, options?: LogicalNetworksUpdateOptionalParams): Promise, LogicalNetworksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, logicalNetworkName: string, logicalNetworks: LogicalNetworksUpdateRequest, options?: LogicalNetworksUpdateOptionalParams): Promise; + // (undocumented) + get(resourceGroupName: string, logicalNetworkName: string, options?: LogicalNetworksGetOptionalParams): Promise; + list(resourceGroupName: string, options?: LogicalNetworksListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: LogicalNetworksListAllOptionalParams): PagedAsyncIterableIterator; } // @public -export type Status = string; +export interface LogicalNetworkStatus { + errorCode?: string; + errorMessage?: string; + // (undocumented) + provisioningStatus?: LogicalNetworkStatusProvisioningStatus; +} + +// @public (undocumented) +export interface LogicalNetworkStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface LogicalNetworksUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface LogicalNetworksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface LogicalNetworksUpdateRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type LogicalNetworksUpdateResponse = LogicalNetworks; + +// @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 MarketplaceGalleryImagesCreateOrUpdateResponse = MarketplaceGalleryImages; + +// @public +export interface MarketplaceGalleryImagesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface MarketplaceGalleryImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MarketplaceGalleryImagesDeleteResponse = MarketplaceGalleryImagesDeleteHeaders; + +// @public +export interface MarketplaceGalleryImagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceGalleryImagesGetResponse = MarketplaceGalleryImages; + +// @public +export interface MarketplaceGalleryImagesListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceGalleryImagesListAllNextResponse = MarketplaceGalleryImagesListResult; + +// @public +export interface MarketplaceGalleryImagesListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceGalleryImagesListAllResponse = MarketplaceGalleryImagesListResult; + +// @public +export interface MarketplaceGalleryImagesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceGalleryImagesListNextResponse = MarketplaceGalleryImagesListResult; + +// @public +export interface MarketplaceGalleryImagesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceGalleryImagesListResponse = MarketplaceGalleryImagesListResult; + +// @public (undocumented) +export interface MarketplaceGalleryImagesListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: MarketplaceGalleryImages[]; +} + +// @public +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, MarketplaceGalleryImagesDeleteResponse>>; + 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 interface MarketplaceGalleryImageStatus { + downloadStatus?: MarketplaceGalleryImageStatusDownloadStatus; + errorCode?: string; + errorMessage?: string; + progressPercentage?: number; + // (undocumented) + provisioningStatus?: MarketplaceGalleryImageStatusProvisioningStatus; +} + +// @public +export interface MarketplaceGalleryImageStatusDownloadStatus { + downloadSizeInMB?: number; +} + +// @public (undocumented) +export interface MarketplaceGalleryImageStatusProvisioningStatus { + operationId?: string; + status?: Status; +} + +// @public +export interface MarketplaceGalleryImagesUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +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 type NetworkInterfacesDeleteResponse = NetworkInterfacesDeleteHeaders; + +// @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, NetworkInterfacesDeleteResponse>>; + 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 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 interface Route { + addressPrefix?: string; + name?: string; + nextHopIpAddress?: string; +} + +// @public +export interface RouteTable { + readonly etag?: string; + readonly name?: string; + routes?: Route[]; + 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 type StorageContainersDeleteResponse = StorageContainersDeleteHeaders; + +// @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, StorageContainersDeleteResponse>>; + 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 (undocumented) +export interface Subnet { + addressPrefix?: string; + addressPrefixes?: string[]; + ipAllocationMethod?: IpAllocationMethodEnum; + ipConfigurationReferences?: SubnetPropertiesFormatIpConfigurationReferencesItem[]; + ipPools?: IPPool[]; + name?: string; + routeTable?: RouteTable; + vlan?: number; +} + +// @public +export interface SubnetPropertiesFormatIpConfigurationReferencesItem { + id?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} // @public export interface TrackedResource extends Resource { @@ -679,14 +1304,425 @@ export interface TrackedResource extends Resource { }; } +// @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 type VirtualHardDisksDeleteResponse = VirtualHardDisksDeleteHeaders; + +// @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, VirtualHardDisksDeleteResponse>>; + 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 VirtualMachineConfigAgentInstanceView { + statuses?: InstanceViewStatus[]; + vmConfigAgentVersion?: string; +} + +// @public +export interface VirtualMachineInstance extends ProxyResource { + extendedLocation?: ExtendedLocation; + guestAgentInstallStatus?: GuestAgentInstallStatus; + hardwareProfile?: VirtualMachineInstancePropertiesHardwareProfile; + httpProxyConfig?: HttpProxyConfiguration; + 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 UploadCertificateRequest { +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) - properties?: RawCertificateData; + storageProfile?: StorageProfileUpdate; +} + +// @public +export interface VirtualMachineInstanceUpdateRequest { + identity?: Identity; + properties?: VirtualMachineInstanceUpdateProperties; +} + +// @public +export interface VirtualMachineInstanceView { + vmAgent?: VirtualMachineConfigAgentInstanceView; } // @public -export type WindowsServerSubscription = string; +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..c9bd2c5957bc 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, + LogicalNetworksOperationsImpl, + MarketplaceGalleryImagesOperationsImpl, + NetworkInterfacesOperationsImpl, + StorageContainersOperationsImpl, + VirtualHardDisksOperationsImpl, + VirtualMachineInstancesImpl, + HybridIdentityMetadataOperationsImpl, + GuestAgentOperationsImpl, + GuestAgentsImpl } from "./operations"; import { - ArcSettings, - Clusters, - Extensions, - Operations + GalleryImagesOperations, + Operations, + LogicalNetworksOperations, + MarketplaceGalleryImagesOperations, + NetworkInterfacesOperations, + StorageContainersOperations, + VirtualHardDisksOperations, + VirtualMachineInstances, + HybridIdentityMetadataOperations, + GuestAgentOperations, + GuestAgents } 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-09-01-preview"; + this.galleryImagesOperations = new GalleryImagesOperationsImpl(this); this.operations = new OperationsImpl(this); + this.logicalNetworksOperations = new LogicalNetworksOperationsImpl(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.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; + logicalNetworksOperations: LogicalNetworksOperations; + marketplaceGalleryImagesOperations: MarketplaceGalleryImagesOperations; + networkInterfacesOperations: NetworkInterfacesOperations; + storageContainersOperations: StorageContainersOperations; + virtualHardDisksOperations: VirtualHardDisksOperations; + virtualMachineInstances: VirtualMachineInstances; + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + guestAgentOperations: GuestAgentOperations; + guestAgents: GuestAgents; } 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..fdfce6ed314e 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,758 +180,1129 @@ 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 { - /** - * Name of the cluster node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; +/** Localized display information for this particular operation. */ +export interface OperationDisplay { /** - * Id of the node in the cluster. + * 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 id?: number; + readonly provider?: string; /** - * State of Windows Server Subscription. + * 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 windowsServerSubscription?: WindowsServerSubscription; + readonly resource?: string; /** - * Manufacturer of the cluster node hardware. + * 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 manufacturer?: string; + readonly operation?: string; /** - * Model name of the cluster node hardware. + * 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 model?: string; + readonly description?: string; +} + +/** DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP options. */ +export interface LogicalNetworkPropertiesDhcpOptions { + /** The list of DNS servers IP addresses. */ + dnsServers?: string[]; +} + +export interface Subnet { + /** Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** The address prefix for the subnet: Cidr for this subnet - IPv4, IPv6. */ + addressPrefix?: string; + /** 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?: SubnetPropertiesFormatIpConfigurationReferencesItem[]; + /** Route table resource. */ + routeTable?: RouteTable; + /** network associated pool of IP Addresses */ + ipPools?: IPPool[]; + /** Vlan to use for the subnet */ + vlan?: number; +} + +/** IPConfigurationReference - Describes a IPConfiguration under the virtual network */ +export interface SubnetPropertiesFormatIpConfigurationReferencesItem { + /** IPConfigurationID */ + id?: string; +} + +/** Route table resource. */ +export interface RouteTable { /** - * Operating system running on the cluster node. + * A unique read-only string that changes whenever the resource is updated. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly etag?: string; /** - * Version of the operating system running on the cluster node. + * Resource name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osVersion?: string; + readonly name?: string; /** - * Immutable id of the cluster node. + * Resource type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serialNumber?: string; + readonly type?: string; + /** Collection of routes contained within a route table. */ + routes?: Route[]; +} + +/** Route - Route resource. */ +export interface Route { + /** Name - name of the subnet */ + name?: string; + /** The destination CIDR to which the route applies. */ + addressPrefix?: string; + /** 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; +} + +export interface IPPool { + /** Name of the IP-Pool */ + name?: string; + /** Type of the IP Pool [vm, vippool] */ + ipPoolType?: IPPoolTypeEnum; + /** Start of the IP address pool */ + start?: string; + /** End of the IP address pool */ + end?: string; + info?: IPPoolInfo; +} + +export interface IPPoolInfo { /** - * Number of physical cores on the cluster node. + * Number of IP addresses allocated from the IP Pool * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly coreCount?: number; + readonly used?: string; /** - * Total available memory on the cluster node (in GiB). + * Number of IP addresses available in the IP Pool * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly memoryInGiB?: number; + readonly available?: string; } -/** Cluster details to update. */ -export interface ClusterPatch { - /** Resource tags. */ +/** The observed state of logical networks */ +export interface LogicalNetworkStatus { + /** LogicalNetwork provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; + provisioningStatus?: LogicalNetworkStatusProvisioningStatus; +} + +export interface LogicalNetworkStatusProvisioningStatus { + /** The ID of the operation performed on the logical network */ + operationId?: string; + /** The status of the operation performed on the logical network [Succeeded, Failed, InProgress] */ + status?: Status; +} + +/** The logical network resource patch definition. */ +export interface LogicalNetworksUpdateRequest { + /** 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; } -export interface UploadCertificateRequest { - properties?: RawCertificateData; +export interface LogicalNetworksListResult { + value?: LogicalNetworks[]; + nextLink?: 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; } -export interface RawCertificateData { - certificates?: string[]; +/** The marketplace gallery image resource patch definition. */ +export interface MarketplaceGalleryImagesUpdateRequest { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface MarketplaceGalleryImagesListResult { + value?: MarketplaceGalleryImages[]; + nextLink?: string; } -/** Cluster Identity details. */ -export interface ClusterIdentityResponse { - aadClientId?: string; - aadTenantId?: string; - aadServicePrincipalObjectId?: string; - aadApplicationObjectId?: 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; } -/** List of Extensions in HCI cluster. */ -export interface ExtensionList { +/** InterfaceIPConfigurationPropertiesFormat properties of IP configuration. */ +export interface IPConfigurationProperties { /** - * List of Extensions in HCI cluster. + * Gateway for network interface * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Extension[]; + readonly gateway?: string; /** - * Link to the next set of results. + * prefixLength for network interface * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly 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 }; } -/** Status of Arc Extension for a particular node in HCI Cluster. */ -export interface PerNodeExtensionState { +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; +} + +/** HTTP Proxy configuration for the VM. */ +export interface HttpProxyConfiguration { + /** The HTTP proxy server endpoint to use. */ + httpProxy?: string; + /** The HTTPS proxy server endpoint to use. */ + httpsProxy?: string; + /** The endpoints that should not go through proxy. */ + noProxy?: string[]; + /** Alternative CA cert to use for connecting to proxy servers. */ + trustedCa?: string; +} + +/** The instance view of a virtual machine. */ +export interface VirtualMachineInstanceView { + /** The VM Config Agent running on the virtual machine. */ + vmAgent?: VirtualMachineConfigAgentInstanceView; +} + +/** The instance view of the VM Config Agent running on the virtual machine. */ +export interface VirtualMachineConfigAgentInstanceView { + /** 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 { /** - * Name of the node in HCI Cluster. + * Specifies the VM's unique SMBIOS ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly vmUuid?: string; /** - * Fully qualified resource ID for the particular Arc Extension on this node. + * 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 extension?: string; + readonly status?: StatusTypes; /** - * State of Arc Extension in this node. + * The time of the last status change. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: NodeExtensionState; -} - -/** 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 { + readonly lastStatusChange?: Date; /** - * List of operations supported by the resource provider + * The hybrid machine agent full version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Operation[]; + readonly agentVersion?: string; /** - * URL to get the next set of operation list results (if there are any). + * Details about the error state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly errorDetails?: ErrorDetail[]; } -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { +/** Identity for the resource. */ +export interface Identity { /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * The principal ID of resource identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly principalId?: string; /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * The tenant ID of resource. * 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 tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; +} + +/** 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; +} + +/** List of GuestAgent. */ +export interface GuestAgentList { + /** Url to follow for getting next page of GuestAgent. */ + nextLink?: string; + /** Array of GuestAgent */ + value: GuestAgent[]; +} + +/** 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; +} + +/** 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; /** - * 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 gallery image. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly origin?: Origin; + readonly provisioningState?: ProvisioningStateEnum; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * The observed state of gallery images * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly actionType?: ActionType; + readonly status?: GalleryImageStatus; } -/** Localized display information for this particular operation. */ -export interface OperationDisplay { +/** The logical network resource definition. */ +export interface LogicalNetworks extends TrackedResource { + /** The extendedLocation of the resource. */ + extendedLocation?: ExtendedLocation; + /** DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP options. */ + dhcpOptions?: LogicalNetworkPropertiesDhcpOptions; + /** Subnet - list of subnets under the logical network */ + subnets?: Subnet[]; /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * Provisioning state of the logical network. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provider?: string; + readonly provisioningState?: ProvisioningStateEnum; + /** name of the network switch to be used for VMs */ + vmSwitchName?: string; /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * The observed state of logical networks * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resource?: string; + readonly status?: LogicalNetworkStatus; +} + +/** 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; /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * Provisioning state of the marketplace gallery image. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operation?: string; + readonly provisioningState?: ProvisioningStateEnum; /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * The observed state of marketplace gallery images * 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; -} - -/** 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; + readonly status?: MarketplaceGalleryImageStatus; } -/** ArcSetting details. */ -export interface ArcSetting extends ProxyResource { - /** - * Provisioning state of the ArcSetting proxy resource. - * 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; +/** 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; /** - * Aggregate state of Arc agent across the nodes in this HCI cluster. + * Provisioning state of the network interface. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aggregateState?: ArcSettingAggregateState; + readonly provisioningState?: ProvisioningStateEnum; /** - * State of Arc agent in each of the nodes. + * The observed state of network interfaces * 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; + readonly status?: NetworkInterfaceStatus; } -/** 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; +/** 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; /** - * Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * Provisioning state of the storage container. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aggregateState?: ExtensionAggregateState; + readonly provisioningState?: ProvisioningStateEnum; /** - * State of Arc Extension in each of the nodes. + * The observed state of storage containers * 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 status?: StorageContainerStatus; } -/** Cluster details. */ -export interface Cluster extends TrackedResource { +/** 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; /** - * Provisioning state. + * Provisioning state of the virtual hard disk. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; + readonly provisioningState?: ProvisioningStateEnum; + /** Storage ContainerID of the storage container to be used for VHD */ + containerId?: string; /** - * Status of the cluster agent. + * The observed state of virtual hard disks * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: Status; + readonly status?: VirtualHardDiskStatus; +} + +/** 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; + /** HTTP Proxy configuration for the VM. */ + httpProxyConfig?: HttpProxyConfiguration; /** - * Unique, immutable resource id. + * Provisioning state of the virtual machine instance. * 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; + readonly provisioningState?: ProvisioningStateEnum; /** - * Properties reported by cluster agent. + * The virtual machine instance view. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reportedProperties?: ClusterReportedProperties; + readonly instanceView?: VirtualMachineInstanceView; /** - * Number of days remaining in the trial period. + * The observed state of virtual machine instances * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trialDaysRemaining?: number; + readonly status?: VirtualMachineInstanceStatus; + /** Guest agent install status. */ + guestAgentInstallStatus?: GuestAgentInstallStatus; /** - * Type of billing applied to the resource. + * Unique identifier for the vm resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly billingModel?: string; + readonly vmId?: string; + /** Unique identifier defined by ARC to identify the guest of the VM. */ + resourceUid?: string; +} + +/** Defines the HybridIdentityMetadata. */ +export interface HybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + resourceUid?: string; + /** The Public Key. */ + publicKey?: string; /** - * First cluster sync timestamp. + * Identity for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly registrationTimestamp?: Date; + readonly identity?: Identity; /** - * Most recent cluster sync timestamp. + * The provisioning state. * 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; + /** 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; } -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" +/** Defines headers for GalleryImages_delete operation. */ +export interface GalleryImagesDeleteHeaders { + location?: string; } -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; +/** Defines headers for GalleryImages_update operation. */ +export interface GalleryImagesUpdateHeaders { + location?: 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" +/** Defines headers for LogicalNetworks_delete operation. */ +export interface LogicalNetworksDeleteHeaders { + location?: string; } -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **Provisioning** - */ -export type ProvisioningState = string; +/** Defines headers for LogicalNetworks_update operation. */ +export interface LogicalNetworksUpdateHeaders { + location?: string; +} -/** Known values of {@link ArcSettingAggregateState} that the service accepts. */ -export enum KnownArcSettingAggregateState { - /** 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" +/** Defines headers for MarketplaceGalleryImages_delete operation. */ +export interface MarketplaceGalleryImagesDeleteHeaders { + location?: 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; +/** Defines headers for MarketplaceGalleryImages_update operation. */ +export interface MarketplaceGalleryImagesUpdateHeaders { + location?: string; +} -/** 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" +/** Defines headers for NetworkInterfaces_delete operation. */ +export interface NetworkInterfacesDeleteHeaders { + location?: string; } -/** - * 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; +/** Defines headers for NetworkInterfaces_update operation. */ +export interface NetworkInterfacesUpdateHeaders { + location?: string; +} -/** 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" +/** Defines headers for StorageContainers_delete operation. */ +export interface StorageContainersDeleteHeaders { + location?: string; } -/** - * 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; +/** Defines headers for StorageContainers_update operation. */ +export interface StorageContainersUpdateHeaders { + location?: string; +} -/** Known values of {@link WindowsServerSubscription} that the service accepts. */ -export enum KnownWindowsServerSubscription { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" +/** Defines headers for VirtualHardDisks_delete operation. */ +export interface VirtualHardDisksDeleteHeaders { + location?: string; } -/** - * 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; +/** Defines headers for VirtualHardDisks_update operation. */ +export interface VirtualHardDisksUpdateHeaders { + location?: string; +} -/** Known values of {@link DiagnosticLevel} that the service accepts. */ -export enum KnownDiagnosticLevel { - /** Off */ - Off = "Off", - /** Basic */ - Basic = "Basic", - /** Enhanced */ - Enhanced = "Enhanced" +/** 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; +} + +/** Known values of {@link CloudInitDataSource} that the service accepts. */ +export enum KnownCloudInitDataSource { + /** NoCloud */ + NoCloud = "NoCloud", + /** Azure */ + Azure = "Azure" } /** - * Defines values for DiagnosticLevel. \ - * {@link KnownDiagnosticLevel} can be used interchangeably with DiagnosticLevel, + * 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 - * **Off** \ - * **Basic** \ - * **Enhanced** + * **NoCloud** \ + * **Azure** */ -export type DiagnosticLevel = string; - -/** Known values of {@link ImdsAttestation} that the service accepts. */ -export enum KnownImdsAttestation { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" +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 ImdsAttestation. \ - * {@link KnownImdsAttestation} can be used interchangeably with ImdsAttestation, + * 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 - * **Disabled** \ - * **Enabled** + * **V1** \ + * **V2** */ -export type ImdsAttestation = string; +export type HyperVGeneration = string; -/** Known values of {@link ExtensionAggregateState} that the service accepts. */ -export enum KnownExtensionAggregateState { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Error */ - Error = "Error", +/** Known values of {@link ProvisioningStateEnum} that the service accepts. */ +export enum KnownProvisioningStateEnum { /** Succeeded */ Succeeded = "Succeeded", - /** Canceled */ - Canceled = "Canceled", /** Failed */ Failed = "Failed", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Deleted */ - Deleted = "Deleted", - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", + /** InProgress */ + InProgress = "InProgress", + /** Accepted */ + Accepted = "Accepted", /** Deleting */ Deleting = "Deleting", - /** Moving */ - Moving = "Moving", - /** PartiallySucceeded */ - PartiallySucceeded = "PartiallySucceeded", - /** PartiallyConnected */ - PartiallyConnected = "PartiallyConnected", - /** InProgress */ - InProgress = "InProgress" + /** Canceled */ + Canceled = "Canceled" } /** - * Defines values for ExtensionAggregateState. \ - * {@link KnownExtensionAggregateState} can be used interchangeably with ExtensionAggregateState, + * 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 - * **NotSpecified** \ - * **Error** \ * **Succeeded** \ - * **Canceled** \ * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ + * **InProgress** \ + * **Accepted** \ * **Deleting** \ - * **Moving** \ - * **PartiallySucceeded** \ - * **PartiallyConnected** \ - * **InProgress** + * **Canceled** */ -export type ExtensionAggregateState = string; +export type ProvisioningStateEnum = string; -/** Known values of {@link NodeExtensionState} that the service accepts. */ -export enum KnownNodeExtensionState { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Error */ - Error = "Error", +/** Known values of {@link Status} that the service accepts. */ +export enum KnownStatus { /** 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" + /** InProgress */ + InProgress = "InProgress" } /** - * Defines values for NodeExtensionState. \ - * {@link KnownNodeExtensionState} can be used interchangeably with NodeExtensionState, + * 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 - * **NotSpecified** \ - * **Error** \ * **Succeeded** \ - * **Canceled** \ * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** + * **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 */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export type NodeExtensionState = string; +export type CreatedByType = string; /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { @@ -932,36 +1340,335 @@ export enum KnownActionType { */ export type ActionType = string; -/** Optional parameters. */ -export interface ArcSettingsListByClusterOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByCluster operation. */ -export type ArcSettingsListByClusterResponse = ArcSettingList; - -/** Optional parameters. */ -export interface ArcSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ArcSettingsGetResponse = ArcSetting; +/** Known values of {@link IpAllocationMethodEnum} that the service accepts. */ +export enum KnownIpAllocationMethodEnum { + /** Dynamic */ + Dynamic = "Dynamic", + /** Static */ + Static = "Static" +} -/** Optional parameters. */ -export interface ArcSettingsCreateOptionalParams - extends coreClient.OperationOptions {} +/** + * 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; + +/** Known values of {@link DiskFileFormat} that the service accepts. */ +export enum KnownDiskFileFormat { + /** Vhdx */ + Vhdx = "vhdx", + /** Vhd */ + Vhd = "vhd" +} -/** Contains response data for the create operation. */ -export type ArcSettingsCreateResponse = ArcSetting; +/** + * 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" +} -/** Optional parameters. */ -export interface ArcSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} +/** + * 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 VmSizeEnum = string; + +/** Known values of {@link SecurityTypes} that the service accepts. */ +export enum KnownSecurityTypes { + /** TrustedLaunch */ + TrustedLaunch = "TrustedLaunch", + /** ConfidentialVM */ + ConfidentialVM = "ConfidentialVM" +} + +/** + * 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" +} + +/** + * 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", + /** 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; +/** Defines values for OperatingSystemTypes. */ +export type OperatingSystemTypes = "Windows" | "Linux"; +/** Defines values for IPPoolTypeEnum. */ +export type IPPoolTypeEnum = "vm" | "vippool"; + +/** 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; +} + +/** Contains response data for the delete operation. */ +export type GalleryImagesDeleteResponse = GalleryImagesDeleteHeaders; + +/** 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 ArcSettingsUpdateResponse = ArcSetting; +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 ArcSettingsDeleteOptionalParams +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 LogicalNetworksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LogicalNetworksGetResponse = LogicalNetworks; + +/** Optional parameters. */ +export interface LogicalNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -969,15 +1676,94 @@ export interface ArcSettingsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type LogicalNetworksCreateOrUpdateResponse = LogicalNetworks; + /** Optional parameters. */ -export interface ArcSettingsGeneratePasswordOptionalParams +export interface LogicalNetworksDeleteOptionalParams + 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 LogicalNetworksDeleteResponse = LogicalNetworksDeleteHeaders; + +/** Optional parameters. */ +export interface LogicalNetworksUpdateOptionalParams + 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 LogicalNetworksUpdateResponse = LogicalNetworks; + +/** Optional parameters. */ +export interface LogicalNetworksListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type LogicalNetworksListResponse = LogicalNetworksListResult; + +/** Optional parameters. */ +export interface LogicalNetworksListAllOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the generatePassword operation. */ -export type ArcSettingsGeneratePasswordResponse = PasswordCredential; +/** Contains response data for the listAll operation. */ +export type LogicalNetworksListAllResponse = LogicalNetworksListResult; /** Optional parameters. */ -export interface ArcSettingsCreateIdentityOptionalParams +export interface LogicalNetworksListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type LogicalNetworksListNextResponse = LogicalNetworksListResult; + +/** Optional parameters. */ +export interface LogicalNetworksListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type LogicalNetworksListAllNextResponse = LogicalNetworksListResult; + +/** 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; +} + +/** Contains response data for the delete operation. */ +export type MarketplaceGalleryImagesDeleteResponse = MarketplaceGalleryImagesDeleteHeaders; + +/** Optional parameters. */ +export interface MarketplaceGalleryImagesUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -985,53 +1771,188 @@ 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 MarketplaceGalleryImagesUpdateResponse = MarketplaceGalleryImages; /** Optional parameters. */ -export interface ArcSettingsListByClusterNextOptionalParams +export interface MarketplaceGalleryImagesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByClusterNext operation. */ -export type ArcSettingsListByClusterNextResponse = ArcSettingList; +/** Contains response data for the list operation. */ +export type MarketplaceGalleryImagesListResponse = MarketplaceGalleryImagesListResult; /** Optional parameters. */ -export interface ClustersListBySubscriptionOptionalParams +export interface MarketplaceGalleryImagesListAllOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type ClustersListBySubscriptionResponse = ClusterList; +/** Contains response data for the listAll operation. */ +export type MarketplaceGalleryImagesListAllResponse = MarketplaceGalleryImagesListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupOptionalParams +export interface MarketplaceGalleryImagesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type ClustersListByResourceGroupResponse = ClusterList; +/** Contains response data for the listNext operation. */ +export type MarketplaceGalleryImagesListNextResponse = MarketplaceGalleryImagesListResult; /** Optional parameters. */ -export interface ClustersGetOptionalParams +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 ClustersGetResponse = Cluster; +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; +} + +/** Contains response data for the delete operation. */ +export type NetworkInterfacesDeleteResponse = NetworkInterfacesDeleteHeaders; /** Optional parameters. */ -export interface ClustersCreateOptionalParams +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; +} + +/** Contains response data for the update operation. */ +export type NetworkInterfacesUpdateResponse = NetworkInterfaces; + +/** Optional parameters. */ +export interface NetworkInterfacesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the create operation. */ -export type ClustersCreateResponse = Cluster; +/** Contains response data for the list operation. */ +export type NetworkInterfacesListResponse = NetworkInterfacesListResult; + +/** Optional parameters. */ +export interface NetworkInterfacesListAllOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAll operation. */ +export type NetworkInterfacesListAllResponse = NetworkInterfacesListResult; /** Optional parameters. */ -export interface ClustersUpdateOptionalParams +export interface NetworkInterfacesListNextOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listNext operation. */ +export type NetworkInterfacesListNextResponse = NetworkInterfacesListResult; + +/** Optional parameters. */ +export interface NetworkInterfacesListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type NetworkInterfacesListAllNextResponse = NetworkInterfacesListResult; + +/** Optional parameters. */ +export interface StorageContainersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type StorageContainersGetResponse = StorageContainers; + +/** 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; +} + +/** Contains response data for the createOrUpdate operation. */ +export type StorageContainersCreateOrUpdateResponse = StorageContainers; + +/** 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; +} + +/** Contains response data for the delete operation. */ +export type StorageContainersDeleteResponse = StorageContainersDeleteHeaders; + +/** 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; +} + /** Contains response data for the update operation. */ -export type ClustersUpdateResponse = Cluster; +export type StorageContainersUpdateResponse = StorageContainers; /** Optional parameters. */ -export interface ClustersDeleteOptionalParams +export interface StorageContainersListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type StorageContainersListResponse = StorageContainersListResult; + +/** Optional parameters. */ +export interface StorageContainersListAllOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAll operation. */ +export type StorageContainersListAllResponse = StorageContainersListResult; + +/** Optional parameters. */ +export interface StorageContainersListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type StorageContainersListNextResponse = StorageContainersListResult; + +/** Optional parameters. */ +export interface StorageContainersListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type StorageContainersListAllNextResponse = StorageContainersListResult; + +/** Optional parameters. */ +export interface VirtualHardDisksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VirtualHardDisksGetResponse = VirtualHardDisks; + +/** Optional parameters. */ +export interface VirtualHardDisksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1039,8 +1960,11 @@ export interface ClustersDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type VirtualHardDisksCreateOrUpdateResponse = VirtualHardDisks; + /** Optional parameters. */ -export interface ClustersUploadCertificateOptionalParams +export interface VirtualHardDisksDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1048,8 +1972,11 @@ export interface ClustersUploadCertificateOptionalParams resumeFrom?: string; } +/** Contains response data for the delete operation. */ +export type VirtualHardDisksDeleteResponse = VirtualHardDisksDeleteHeaders; + /** Optional parameters. */ -export interface ClustersCreateIdentityOptionalParams +export interface VirtualHardDisksUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1057,39 +1984,46 @@ export interface ClustersCreateIdentityOptionalParams resumeFrom?: string; } -/** Contains response data for the createIdentity operation. */ -export type ClustersCreateIdentityResponse = ClusterIdentityResponse; +/** Contains response data for the update operation. */ +export type VirtualHardDisksUpdateResponse = VirtualHardDisks; /** Optional parameters. */ -export interface ClustersListBySubscriptionNextOptionalParams +export interface VirtualHardDisksListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ClustersListBySubscriptionNextResponse = ClusterList; +/** Contains response data for the list operation. */ +export type VirtualHardDisksListResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupNextOptionalParams +export interface VirtualHardDisksListAllOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ClustersListByResourceGroupNextResponse = ClusterList; +/** Contains response data for the listAll operation. */ +export type VirtualHardDisksListAllResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ExtensionsListByArcSettingOptionalParams +export interface VirtualHardDisksListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByArcSetting operation. */ -export type ExtensionsListByArcSettingResponse = ExtensionList; +/** Contains response data for the listNext operation. */ +export type VirtualHardDisksListNextResponse = VirtualHardDisksListResult; /** Optional parameters. */ -export interface ExtensionsGetOptionalParams +export interface VirtualHardDisksListAllNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllNext operation. */ +export type VirtualHardDisksListAllNextResponse = VirtualHardDisksListResult; + +/** Optional parameters. */ +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ExtensionsGetResponse = Extension; +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface ExtensionsCreateOptionalParams +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1097,11 +2031,23 @@ export interface ExtensionsCreateOptionalParams resumeFrom?: string; } -/** Contains response data for the create operation. */ -export type ExtensionsCreateResponse = Extension; +/** 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 ExtensionsUpdateOptionalParams +export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1110,10 +2056,10 @@ export interface ExtensionsUpdateOptionalParams } /** Contains response data for the update operation. */ -export type ExtensionsUpdateResponse = Extension; +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface ExtensionsDeleteOptionalParams +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1121,19 +2067,114 @@ export interface ExtensionsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the start operation. */ +export type VirtualMachineInstancesStartResponse = VirtualMachineInstance; + /** Optional parameters. */ -export interface ExtensionsListByArcSettingNextOptionalParams +export interface VirtualMachineInstancesStopOptionalParams + 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 stop operation. */ +export type VirtualMachineInstancesStopResponse = VirtualMachineInstance; + +/** Optional parameters. */ +export interface VirtualMachineInstancesRestartOptionalParams + 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 restart operation. */ +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstance; + +/** Optional parameters. */ +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByArcSettingNext operation. */ -export type ExtensionsListByArcSettingNextResponse = ExtensionList; +/** Contains response data for the list operation. */ +export type VirtualMachineInstancesListResponse = VirtualMachineInstanceListResult; /** Optional parameters. */ -export interface OperationsListOptionalParams +export interface VirtualMachineInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstanceListResult; + +/** Optional parameters. */ +export interface HybridIdentityMetadataGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; + +/** Optional parameters. */ +export interface HybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; +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 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. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +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 GuestAgentDeleteOptionalParams + 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 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 AzureStackHCIClientOptionalParams diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts index 46e33b41b623..7229eeea024f 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,135 @@ 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" - } - } + name: "String" } - }, - lastUpdated: { - serializedName: "lastUpdated", - readOnly: true, - type: { - name: "DateTime" - } - }, - imdsAttestation: { - serializedName: "imdsAttestation", - readOnly: true, - type: { - name: "String" - } - }, - diagnosticLevel: { - serializedName: "diagnosticLevel", + } + } + } +}; + +export const LogicalNetworkPropertiesDhcpOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalNetworkPropertiesDhcpOptions", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ClusterNode: coreClient.CompositeMapper = { +export const Subnet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterNode", + className: "Subnet", 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", - readOnly: true, - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "Number" - } - }, - windowsServerSubscription: { - serializedName: "windowsServerSubscription", - readOnly: true, type: { name: "String" } }, - manufacturer: { - serializedName: "manufacturer", - readOnly: true, + addressPrefix: { + serializedName: "properties.addressPrefix", type: { name: "String" } }, - model: { - serializedName: "model", - readOnly: true, + addressPrefixes: { + serializedName: "properties.addressPrefixes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - osName: { - serializedName: "osName", - readOnly: true, + ipAllocationMethod: { + serializedName: "properties.ipAllocationMethod", type: { name: "String" } }, - osVersion: { - serializedName: "osVersion", - readOnly: true, + ipConfigurationReferences: { + serializedName: "properties.ipConfigurationReferences", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubnetPropertiesFormatIpConfigurationReferencesItem" + } + } } }, - serialNumber: { - serializedName: "serialNumber", - readOnly: true, + routeTable: { + serializedName: "properties.routeTable", type: { - name: "String" + name: "Composite", + className: "RouteTable" } }, - coreCount: { - serializedName: "coreCount", - readOnly: true, + ipPools: { + serializedName: "properties.ipPools", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPPool" + } + } } }, - memoryInGiB: { - serializedName: "memoryInGiB", - readOnly: true, + vlan: { + serializedName: "properties.vlan", type: { name: "Number" } @@ -473,136 +622,150 @@ export const ClusterNode: coreClient.CompositeMapper = { } }; -export const ClusterPatch: coreClient.CompositeMapper = { +export const SubnetPropertiesFormatIpConfigurationReferencesItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterPatch", + className: "SubnetPropertiesFormatIpConfigurationReferencesItem", modelProperties: { - tags: { - serializedName: "tags", + id: { + serializedName: "ID", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } - }, - cloudManagementEndpoint: { - serializedName: "properties.cloudManagementEndpoint", + } + } + } +}; + +export const RouteTable: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RouteTable", + modelProperties: { + etag: { + serializedName: "etag", + readOnly: true, type: { name: "String" } }, - aadClientId: { - serializedName: "properties.aadClientId", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - aadTenantId: { - serializedName: "properties.aadTenantId", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - desiredProperties: { - serializedName: "properties.desiredProperties", + routes: { + serializedName: "properties.routes", type: { - name: "Composite", - className: "ClusterDesiredProperties" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Route" + } + } } } } } }; -export const UploadCertificateRequest: coreClient.CompositeMapper = { +export const Route: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UploadCertificateRequest", + className: "Route", modelProperties: { - properties: { - serializedName: "properties", + 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: "Composite", - className: "RawCertificateData" + name: "String" } - } - } - } -}; - -export const RawCertificateData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RawCertificateData", - modelProperties: { - certificates: { - serializedName: "certificates", + }, + addressPrefix: { + serializedName: "properties.addressPrefix", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + nextHopIpAddress: { + serializedName: "properties.nextHopIpAddress", + type: { + name: "String" } } } } }; -export const ClusterIdentityResponse: coreClient.CompositeMapper = { +export const IPPool: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterIdentityResponse", + className: "IPPool", modelProperties: { - aadClientId: { - serializedName: "properties.aadClientId", + name: { + serializedName: "name", type: { name: "String" } }, - aadTenantId: { - serializedName: "properties.aadTenantId", + ipPoolType: { + serializedName: "ipPoolType", type: { - name: "String" + name: "Enum", + allowedValues: ["vm", "vippool"] } }, - aadServicePrincipalObjectId: { - serializedName: "properties.aadServicePrincipalObjectId", + start: { + serializedName: "start", type: { name: "String" } }, - aadApplicationObjectId: { - serializedName: "properties.aadApplicationObjectId", + end: { + serializedName: "end", type: { name: "String" } + }, + info: { + serializedName: "info", + type: { + name: "Composite", + className: "IPPoolInfo" + } } } } }; -export const ExtensionList: coreClient.CompositeMapper = { +export const IPPoolInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtensionList", + className: "IPPoolInfo", modelProperties: { - value: { - serializedName: "value", + used: { + serializedName: "used", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Extension" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + available: { + serializedName: "available", readOnly: true, type: { name: "String" @@ -612,28 +775,47 @@ export const ExtensionList: coreClient.CompositeMapper = { } }; -export const PerNodeExtensionState: coreClient.CompositeMapper = { +export const LogicalNetworkStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PerNodeExtensionState", + className: "LogicalNetworkStatus", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - extension: { - serializedName: "extension", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - state: { - serializedName: "state", - readOnly: true, + provisioningStatus: { + serializedName: "provisioningStatus", + type: { + name: "Composite", + className: "LogicalNetworkStatusProvisioningStatus" + } + } + } + } +}; + +export const LogicalNetworkStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalNetworkStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", type: { name: "String" } @@ -642,27 +824,41 @@ export const PerNodeExtensionState: coreClient.CompositeMapper = { } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const LogicalNetworksUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "LogicalNetworksUpdateRequest", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const LogicalNetworksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalNetworksListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "LogicalNetworks" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -671,79 +867,60 @@ export const OperationListResult: coreClient.CompositeMapper = { } }; -export const Operation: coreClient.CompositeMapper = { +export const MarketplaceGalleryImageStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "MarketplaceGalleryImageStatus", 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", + provisioningStatus: { + serializedName: "provisioningStatus", type: { name: "Composite", - className: "OperationDisplay" + className: "MarketplaceGalleryImageStatusProvisioningStatus" } }, - origin: { - serializedName: "origin", - readOnly: true, + downloadStatus: { + serializedName: "downloadStatus", type: { - name: "String" + name: "Composite", + className: "MarketplaceGalleryImageStatusDownloadStatus" } }, - actionType: { - serializedName: "actionType", - readOnly: true, + progressPercentage: { + serializedName: "progressPercentage", type: { - name: "String" + name: "Number" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const MarketplaceGalleryImageStatusProvisioningStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "MarketplaceGalleryImageStatusProvisioningStatus", modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - readOnly: true, + operationId: { + serializedName: "operationId", type: { name: "String" } }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } @@ -752,430 +929,2307 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ArcConnectivityProperties: coreClient.CompositeMapper = { +export const MarketplaceGalleryImageStatusDownloadStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcConnectivityProperties", + className: "MarketplaceGalleryImageStatusDownloadStatus", modelProperties: { - enabled: { - serializedName: "enabled", + downloadSizeInMB: { + serializedName: "downloadSizeInMB", type: { - name: "Boolean" + name: "Number" } } } } }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { +export const MarketplaceGalleryImagesUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "MarketplaceGalleryImagesUpdateRequest", modelProperties: { - ...Resource.type.modelProperties, tags: { serializedName: "tags", type: { name: "Dictionary", value: { type: { name: "String" } } } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } } } } }; -export const ArcSetting: coreClient.CompositeMapper = { +export const MarketplaceGalleryImagesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSetting", + className: "MarketplaceGalleryImagesListResult", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MarketplaceGalleryImages" + } + } } }, - arcInstanceResourceGroup: { - serializedName: "properties.arcInstanceResourceGroup", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - arcApplicationClientId: { - serializedName: "properties.arcApplicationClientId", + } + } + } +}; + +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" } }, - arcApplicationTenantId: { - serializedName: "properties.arcApplicationTenantId", + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "IPConfigurationProperties" + } + } + } + } +}; + +export const IPConfigurationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPConfigurationProperties", + modelProperties: { + gateway: { + serializedName: "gateway", + readOnly: true, type: { name: "String" } }, - arcServicePrincipalObjectId: { - serializedName: "properties.arcServicePrincipalObjectId", + prefixLength: { + serializedName: "prefixLength", + readOnly: true, type: { name: "String" } }, - arcApplicationObjectId: { - serializedName: "properties.arcApplicationObjectId", + privateIPAddress: { + serializedName: "privateIPAddress", type: { name: "String" } }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + subnet: { + serializedName: "subnet", + type: { + name: "Composite", + className: "IPConfigurationPropertiesSubnet" + } + } + } + } +}; + +export const IPConfigurationPropertiesSubnet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPConfigurationPropertiesSubnet", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } - }, - perNodeDetails: { - serializedName: "properties.perNodeDetails", - readOnly: true, + } + } + } +}; + +export const InterfaceDNSSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InterfaceDNSSettings", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "PerNodeState" + name: "String" } } } - }, - connectivityProperties: { - serializedName: "properties.connectivityProperties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - createdBy: { - serializedName: "systemData.createdBy", + } + } + } +}; + +export const NetworkInterfaceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfaceStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "DateTime" + name: "Composite", + className: "NetworkInterfaceStatusProvisioningStatus" } - }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + } + } + } +}; + +export const NetworkInterfaceStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfaceStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + status: { + serializedName: "status", type: { name: "String" } - }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", - type: { - name: "DateTime" - } } } } }; -export const Extension: coreClient.CompositeMapper = { +export const NetworkInterfacesUpdateRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Extension", + className: "NetworkInterfacesUpdateRequest", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - perNodeExtensionDetails: { - serializedName: "properties.perNodeExtensionDetails", - readOnly: true, + } + } + } +}; + +export const NetworkInterfacesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacesListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeExtensionState" + className: "NetworkInterfaces" } } } }, - forceUpdateTag: { - serializedName: "properties.extensionParameters.forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "properties.extensionParameters.publisher", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - typePropertiesExtensionParametersType: { - serializedName: "properties.extensionParameters.type", + } + } + } +}; + +export const StorageContainerStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainerStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.extensionParameters.typeHandlerVersion", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: - "properties.extensionParameters.autoUpgradeMinorVersion", + availableSizeMB: { + serializedName: "availableSizeMB", type: { - name: "Boolean" + name: "Number" } }, - settings: { - serializedName: "properties.extensionParameters.settings", + containerSizeMB: { + serializedName: "containerSizeMB", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } }, - protectedSettings: { - serializedName: "properties.extensionParameters.protectedSettings", + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Composite", + className: "StorageContainerStatusProvisioningStatus" } - }, - createdBy: { - serializedName: "systemData.createdBy", + } + } + } +}; + +export const StorageContainerStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainerStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + status: { + serializedName: "status", type: { name: "String" } - }, - createdAt: { - serializedName: "systemData.createdAt", + } + } + } +}; + +export const StorageContainersUpdateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainersUpdateRequest", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + } + } + } +}; + +export const StorageContainersListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainersListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageContainers" + } + } } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", - type: { - name: "DateTime" - } } } } }; -export const Cluster: coreClient.CompositeMapper = { +export const VirtualHardDiskStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cluster", + className: "VirtualHardDiskStatus", modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - status: { - serializedName: "properties.status", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - cloudId: { - serializedName: "properties.cloudId", - readOnly: true, + provisioningStatus: { + serializedName: "provisioningStatus", type: { - name: "String" + name: "Composite", + className: "VirtualHardDiskStatusProvisioningStatus" } - }, - cloudManagementEndpoint: { - serializedName: "properties.cloudManagementEndpoint", + } + } + } +}; + +export const VirtualHardDiskStatusProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDiskStatusProvisioningStatus", + modelProperties: { + operationId: { + serializedName: "operationId", type: { name: "String" } }, - aadClientId: { - serializedName: "properties.aadClientId", + status: { + serializedName: "status", type: { name: "String" } - }, - aadTenantId: { - serializedName: "properties.aadTenantId", + } + } + } +}; + +export const VirtualHardDisksUpdateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisksUpdateRequest", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - aadApplicationObjectId: { - serializedName: "properties.aadApplicationObjectId", + } + } + } +}; + +export const VirtualHardDisksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisksListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualHardDisks" + } + } } }, - aadServicePrincipalObjectId: { - serializedName: "properties.aadServicePrincipalObjectId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - desiredProperties: { - serializedName: "properties.desiredProperties", - type: { - name: "Composite", - className: "ClusterDesiredProperties" + } + } + } +}; + +export const VirtualMachineInstancePropertiesHardwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesHardwareProfile", + modelProperties: { + vmSize: { + serializedName: "vmSize", + type: { + name: "String" + } + }, + processors: { + serializedName: "processors", + type: { + name: "Number" + } + }, + memoryMB: { + serializedName: "memoryMB", + type: { + name: "Number" } }, - reportedProperties: { - serializedName: "properties.reportedProperties", + dynamicMemoryConfig: { + serializedName: "dynamicMemoryConfig", type: { name: "Composite", - className: "ClusterReportedProperties" + className: + "VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig", + modelProperties: { + maximumMemoryMB: { + serializedName: "maximumMemoryMB", + type: { + name: "Number" } }, - trialDaysRemaining: { - serializedName: "properties.trialDaysRemaining", - readOnly: true, + minimumMemoryMB: { + serializedName: "minimumMemoryMB", type: { name: "Number" } }, - billingModel: { - serializedName: "properties.billingModel", - 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: + "VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem" + } + } + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesOsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfile", + modelProperties: { + adminPassword: { + serializedName: "adminPassword", type: { name: "String" } }, - registrationTimestamp: { - serializedName: "properties.registrationTimestamp", - readOnly: true, + adminUsername: { + serializedName: "adminUsername", type: { - name: "DateTime" + name: "String" } }, - lastSyncTimestamp: { - serializedName: "properties.lastSyncTimestamp", - readOnly: true, + computerName: { + serializedName: "computerName", type: { - name: "DateTime" + name: "String" } }, - lastBillingTimestamp: { - serializedName: "properties.lastBillingTimestamp", - readOnly: true, + linuxConfiguration: { + serializedName: "linuxConfiguration", type: { - name: "DateTime" + name: "Composite", + className: + "VirtualMachineInstancePropertiesOsProfileLinuxConfiguration" } }, - serviceEndpoint: { - serializedName: "properties.serviceEndpoint", - readOnly: true, + windowsConfiguration: { + serializedName: "windowsConfiguration", + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesOsProfileWindowsConfiguration" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesOsProfileLinuxConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfileLinuxConfiguration", + modelProperties: { + disablePasswordAuthentication: { + serializedName: "disablePasswordAuthentication", + type: { + name: "Boolean" + } + }, + ssh: { + serializedName: "ssh", + type: { + name: "Composite", + className: "SshConfiguration" + } + }, + provisionVMAgent: { + defaultValue: true, + serializedName: "provisionVMAgent", + type: { + name: "Boolean" + } + }, + provisionVMConfigAgent: { + defaultValue: true, + serializedName: "provisionVMConfigAgent", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SshConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshConfiguration", + modelProperties: { + publicKeys: { + serializedName: "publicKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SshPublicKey" + } + } + } + } + } + } +}; + +export const SshPublicKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshPublicKey", + modelProperties: { + path: { + serializedName: "path", type: { name: "String" } }, - createdBy: { - serializedName: "systemData.createdBy", + keyData: { + serializedName: "keyData", type: { name: "String" } + } + } + } +}; + +export const VirtualMachineInstancePropertiesOsProfileWindowsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesOsProfileWindowsConfiguration", + modelProperties: { + enableAutomaticUpdates: { + serializedName: "enableAutomaticUpdates", + type: { + name: "Boolean" + } }, - createdByType: { - serializedName: "systemData.createdByType", + ssh: { + serializedName: "ssh", + type: { + name: "Composite", + className: "SshConfiguration" + } + }, + timeZone: { + serializedName: "timeZone", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + provisionVMAgent: { + defaultValue: true, + serializedName: "provisionVMAgent", type: { - name: "DateTime" + name: "Boolean" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + provisionVMConfigAgent: { + defaultValue: true, + serializedName: "provisionVMConfigAgent", + type: { + name: "Boolean" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesSecurityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesSecurityProfile", + modelProperties: { + enableTPM: { + defaultValue: false, + serializedName: "enableTPM", + type: { + name: "Boolean" + } + }, + uefiSettings: { + serializedName: "uefiSettings", + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesSecurityProfileUefiSettings" + } + }, + securityType: { + serializedName: "securityType", type: { name: "String" } + } + } + } +}; + +export const VirtualMachineInstancePropertiesSecurityProfileUefiSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesSecurityProfileUefiSettings", + modelProperties: { + secureBootEnabled: { + defaultValue: false, + serializedName: "secureBootEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfile", + modelProperties: { + dataDisks: { + serializedName: "dataDisks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesStorageProfileDataDisksItem" + } + } + } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + imageReference: { + serializedName: "imageReference", + type: { + name: "Composite", + className: + "VirtualMachineInstancePropertiesStorageProfileImageReference" + } + }, + osDisk: { + serializedName: "osDisk", + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfileOsDisk" + } + }, + vmConfigStoragePathId: { + serializedName: "vmConfigStoragePathId", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancePropertiesStorageProfileDataDisksItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancePropertiesStorageProfileDataDisksItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +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" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + osType: { + serializedName: "osType", type: { - name: "DateTime" + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + } + } + } +}; + +export const HttpProxyConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpProxyConfiguration", + modelProperties: { + httpProxy: { + serializedName: "httpProxy", + type: { + name: "String" + } + }, + httpsProxy: { + serializedName: "httpsProxy", + type: { + name: "String" + } + }, + noProxy: { + serializedName: "noProxy", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + trustedCa: { + serializedName: "trustedCa", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceView", + modelProperties: { + vmAgent: { + serializedName: "vmAgent", + type: { + name: "Composite", + className: "VirtualMachineConfigAgentInstanceView" + } + } + } + } +}; + +export const VirtualMachineConfigAgentInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineConfigAgentInstanceView", + modelProperties: { + vmConfigAgentVersion: { + serializedName: "vmConfigAgentVersion", + type: { + name: "String" + } + }, + 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" + } + }, + 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 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 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 LogicalNetworks: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalNetworks", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + dhcpOptions: { + serializedName: "properties.dhcpOptions", + type: { + name: "Composite", + className: "LogicalNetworkPropertiesDhcpOptions" + } + }, + subnets: { + serializedName: "properties.subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Subnet" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + vmSwitchName: { + serializedName: "properties.vmSwitchName", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "LogicalNetworkStatus" + } + } + } + } +}; + +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 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" + } + }, + httpProxyConfig: { + serializedName: "properties.httpProxyConfig", + type: { + name: "Composite", + className: "HttpProxyConfiguration" + } + }, + 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" + } + }, + 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 LogicalNetworksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalNetworksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const LogicalNetworksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalNetworksUpdateHeaders", + 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" } } } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts index d14a11a57d80..716ddc85d71d 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, + LogicalNetworks as LogicalNetworksMapper, + LogicalNetworksUpdateRequest as LogicalNetworksUpdateRequestMapper, + 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 } 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-09-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,129 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const cluster: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterMapper +export const logicalNetworkName: OperationURLParameter = { + parameterPath: "logicalNetworkName", + mapper: { + 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: "logicalNetworkName", + required: true, + type: { + name: "String" + } + } +}; + +export const logicalNetworks: OperationParameter = { + parameterPath: "logicalNetworks", + mapper: LogicalNetworksMapper +}; + +export const logicalNetworks1: OperationParameter = { + parameterPath: "logicalNetworks", + mapper: LogicalNetworksUpdateRequestMapper +}; + +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 cluster1: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterPatchMapper +export const storageContainers: OperationParameter = { + parameterPath: "storageContainers", + mapper: StorageContainersMapper }; -export const uploadCertificateRequest: OperationParameter = { - parameterPath: "uploadCertificateRequest", - mapper: UploadCertificateRequestMapper +export const storageContainers1: OperationParameter = { + parameterPath: "storageContainers", + mapper: StorageContainersUpdateRequestMapper }; -export const extensionName: OperationURLParameter = { - parameterPath: "extensionName", +export const virtualHardDiskName: OperationURLParameter = { + parameterPath: "virtualHardDiskName", 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: 80, + MinLength: 1 + }, + serializedName: "virtualHardDiskName", required: true, type: { name: "String" @@ -167,7 +276,39 @@ export const extensionName: OperationURLParameter = { } }; -export const extension: OperationParameter = { - parameterPath: "extension", - mapper: ExtensionMapper +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 virtualMachineInstance1: OperationParameter = { + parameterPath: "virtualMachineInstance", + mapper: VirtualMachineInstanceUpdateRequestMapper +}; + +export const body: OperationParameter = { + parameterPath: ["options", "body"], + mapper: GuestAgentMapper }; 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/galleryImagesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/galleryImagesOperations.ts new file mode 100644 index 000000000000..8759aca78bf8 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/galleryImagesOperations.ts @@ -0,0 +1,733 @@ +/* + * 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 { 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GalleryImages, + GalleryImagesListNextOptionalParams, + GalleryImagesListOptionalParams, + GalleryImagesListResponse, + GalleryImagesListAllNextOptionalParams, + GalleryImagesListAllOptionalParams, + GalleryImagesListAllResponse, + GalleryImagesGetOptionalParams, + GalleryImagesGetResponse, + GalleryImagesCreateOrUpdateOptionalParams, + GalleryImagesCreateOrUpdateResponse, + GalleryImagesDeleteOptionalParams, + GalleryImagesDeleteResponse, + GalleryImagesUpdateRequest, + GalleryImagesUpdateOptionalParams, + GalleryImagesUpdateResponse, + GalleryImagesListNextResponse, + GalleryImagesListAllNextResponse +} from "../models"; + +/// +/** Class containing GalleryImagesOperations operations. */ +export class GalleryImagesOperationsImpl implements GalleryImagesOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class GalleryImagesOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * 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 list( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams + ): 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?: GalleryImagesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GalleryImagesListResponse; + 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?: GalleryImagesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * 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 listAll( + options?: GalleryImagesListAllOptionalParams + ): 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?: GalleryImagesListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GalleryImagesListAllResponse; + 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?: GalleryImagesListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * 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 { + return this.client.sendOperationRequest( + { resourceGroupName, galleryImageName, options }, + getOperationSpec + ); + } + + /** + * 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. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImages, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GalleryImagesCreateOrUpdateResponse + > + > { + 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, 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; + } + + /** + * 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. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImages, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + galleryImageName, + galleryImages, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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. + */ + async beginDelete( + resourceGroupName: string, + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GalleryImagesDeleteResponse + > + > { + 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, galleryImageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + GalleryImagesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * 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. + */ + async beginDeleteAndWait( + resourceGroupName: string, + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryImageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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. + */ + async beginUpdate( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImagesUpdateRequest, + options?: GalleryImagesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GalleryImagesUpdateResponse + > + > { + 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, galleryImageName, galleryImages, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + GalleryImagesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * 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. + */ + async beginUpdateAndWait( + resourceGroupName: string, + galleryImageName: string, + galleryImages: GalleryImagesUpdateRequest, + options?: GalleryImagesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryImageName, + galleryImages, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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 _list( + resourceGroupName: string, + options?: GalleryImagesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * 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 List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: GalleryImagesListNextOptionalParams + ): 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?: GalleryImagesListAllNextOptionalParams + ): 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/galleryImages/{galleryImageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", + httpMethod: "PUT", + responses: { + 200: { + 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.galleryImageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.GalleryImagesDeleteHeaders + }, + 201: { + headersMapper: Mappers.GalleryImagesDeleteHeaders + }, + 202: { + headersMapper: Mappers.GalleryImagesDeleteHeaders + }, + 204: { + headersMapper: Mappers.GalleryImagesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GalleryImages + }, + 201: { + bodyMapper: Mappers.GalleryImages + }, + 202: { + bodyMapper: Mappers.GalleryImages + }, + 204: { + bodyMapper: Mappers.GalleryImages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.galleryImages1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryImageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryImagesListResult + }, + 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/galleryImages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryImagesListResult + }, + 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.GalleryImagesListResult + }, + 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.GalleryImagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; 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..90117ffbfca8 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 "./logicalNetworksOperations"; +export * from "./marketplaceGalleryImagesOperations"; +export * from "./networkInterfacesOperations"; +export * from "./storageContainersOperations"; +export * from "./virtualHardDisksOperations"; +export * from "./virtualMachineInstances"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./guestAgentOperations"; +export * from "./guestAgents"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/logicalNetworksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/logicalNetworksOperations.ts new file mode 100644 index 000000000000..faf7b2a10845 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/logicalNetworksOperations.ts @@ -0,0 +1,733 @@ +/* + * 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 { LogicalNetworksOperations } 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 { + LogicalNetworks, + LogicalNetworksListNextOptionalParams, + LogicalNetworksListOptionalParams, + LogicalNetworksListResponse, + LogicalNetworksListAllNextOptionalParams, + LogicalNetworksListAllOptionalParams, + LogicalNetworksListAllResponse, + LogicalNetworksGetOptionalParams, + LogicalNetworksGetResponse, + LogicalNetworksCreateOrUpdateOptionalParams, + LogicalNetworksCreateOrUpdateResponse, + LogicalNetworksDeleteOptionalParams, + LogicalNetworksDeleteResponse, + LogicalNetworksUpdateRequest, + LogicalNetworksUpdateOptionalParams, + LogicalNetworksUpdateResponse, + LogicalNetworksListNextResponse, + LogicalNetworksListAllNextResponse +} from "../models"; + +/// +/** Class containing LogicalNetworksOperations operations. */ +export class LogicalNetworksOperationsImpl + implements LogicalNetworksOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class LogicalNetworksOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * Lists all of the logical networks in the specified resource group. Use the nextLink property in the + * response to get the next page of logical networks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: LogicalNetworksListOptionalParams + ): 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?: LogicalNetworksListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LogicalNetworksListResponse; + 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?: LogicalNetworksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the logical networks in the specified subscription. Use the nextLink property in the + * response to get the next page of logical networks. + * @param options The options parameters. + */ + public listAll( + options?: LogicalNetworksListAllOptionalParams + ): 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?: LogicalNetworksListAllOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LogicalNetworksListAllResponse; + 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?: LogicalNetworksListAllOptionalParams + ): 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 logicalNetworkName Name of the logical network + * @param options The options parameters. + */ + get( + resourceGroupName: string, + logicalNetworkName: string, + options?: LogicalNetworksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, logicalNetworkName, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a logical network. Please note some properties can be set only + * during logical network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworks, + options?: LogicalNetworksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LogicalNetworksCreateOrUpdateResponse + > + > { + 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, logicalNetworkName, logicalNetworks, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + LogicalNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a logical network. Please note some properties can be set only + * during logical network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworks, + options?: LogicalNetworksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + logicalNetworkName, + logicalNetworks, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + logicalNetworkName: string, + options?: LogicalNetworksDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LogicalNetworksDeleteResponse + > + > { + 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, logicalNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + LogicalNetworksDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + logicalNetworkName: string, + options?: LogicalNetworksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + logicalNetworkName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource patch definition. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworksUpdateRequest, + options?: LogicalNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LogicalNetworksUpdateResponse + > + > { + 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, logicalNetworkName, logicalNetworks, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + LogicalNetworksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource patch definition. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworksUpdateRequest, + options?: LogicalNetworksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + logicalNetworkName, + logicalNetworks, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all of the logical networks in the specified resource group. Use the nextLink property in the + * response to get the next page of logical networks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: LogicalNetworksListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Lists all of the logical networks in the specified subscription. Use the nextLink property in the + * response to get the next page of logical networks. + * @param options The options parameters. + */ + private _listAll( + options?: LogicalNetworksListAllOptionalParams + ): 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?: LogicalNetworksListNextOptionalParams + ): 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?: LogicalNetworksListAllNextOptionalParams + ): 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/logicalNetworks/{logicalNetworkName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogicalNetworks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.logicalNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LogicalNetworks + }, + 201: { + bodyMapper: Mappers.LogicalNetworks + }, + 202: { + bodyMapper: Mappers.LogicalNetworks + }, + 204: { + bodyMapper: Mappers.LogicalNetworks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.logicalNetworks, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.logicalNetworkName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.LogicalNetworksDeleteHeaders + }, + 201: { + headersMapper: Mappers.LogicalNetworksDeleteHeaders + }, + 202: { + headersMapper: Mappers.LogicalNetworksDeleteHeaders + }, + 204: { + headersMapper: Mappers.LogicalNetworksDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.logicalNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LogicalNetworks + }, + 201: { + bodyMapper: Mappers.LogicalNetworks + }, + 202: { + bodyMapper: Mappers.LogicalNetworks + }, + 204: { + bodyMapper: Mappers.LogicalNetworks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.logicalNetworks1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.logicalNetworkName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogicalNetworksListResult + }, + 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/logicalNetworks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogicalNetworksListResult + }, + 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.LogicalNetworksListResult + }, + 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.LogicalNetworksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; 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..d7b74dd2d627 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/marketplaceGalleryImagesOperations.ts @@ -0,0 +1,744 @@ +/* + * 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, + MarketplaceGalleryImagesDeleteResponse, + 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< + SimplePollerLike< + OperationState, + MarketplaceGalleryImagesDeleteResponse + > + > { + 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< + MarketplaceGalleryImagesDeleteResponse, + OperationState + >(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: { + headersMapper: Mappers.MarketplaceGalleryImagesDeleteHeaders + }, + 201: { + headersMapper: Mappers.MarketplaceGalleryImagesDeleteHeaders + }, + 202: { + headersMapper: Mappers.MarketplaceGalleryImagesDeleteHeaders + }, + 204: { + headersMapper: Mappers.MarketplaceGalleryImagesDeleteHeaders + }, + 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..c54bbb3fb31e --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/networkInterfacesOperations.ts @@ -0,0 +1,744 @@ +/* + * 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, + NetworkInterfacesDeleteResponse, + 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< + SimplePollerLike< + OperationState, + NetworkInterfacesDeleteResponse + > + > { + 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< + NetworkInterfacesDeleteResponse, + OperationState + >(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: { + headersMapper: Mappers.NetworkInterfacesDeleteHeaders + }, + 201: { + headersMapper: Mappers.NetworkInterfacesDeleteHeaders + }, + 202: { + headersMapper: Mappers.NetworkInterfacesDeleteHeaders + }, + 204: { + headersMapper: Mappers.NetworkInterfacesDeleteHeaders + }, + 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..73641fa9c1ce --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/storageContainersOperations.ts @@ -0,0 +1,744 @@ +/* + * 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, + StorageContainersDeleteResponse, + 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< + SimplePollerLike< + OperationState, + StorageContainersDeleteResponse + > + > { + 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< + StorageContainersDeleteResponse, + OperationState + >(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: { + headersMapper: Mappers.StorageContainersDeleteHeaders + }, + 201: { + headersMapper: Mappers.StorageContainersDeleteHeaders + }, + 202: { + headersMapper: Mappers.StorageContainersDeleteHeaders + }, + 204: { + headersMapper: Mappers.StorageContainersDeleteHeaders + }, + 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/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualHardDisksOperations.ts similarity index 53% rename from sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts rename to sdk/azurestackhci/arm-azurestackhci/src/operations/virtualHardDisksOperations.ts index 0dcec8886e8a..fbe38b15027d 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualHardDisksOperations.ts @@ -8,44 +8,46 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { Clusters } from "../operationsInterfaces"; +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 { 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 { + VirtualHardDisks, + VirtualHardDisksListNextOptionalParams, + VirtualHardDisksListOptionalParams, + VirtualHardDisksListResponse, + VirtualHardDisksListAllNextOptionalParams, + VirtualHardDisksListAllOptionalParams, + VirtualHardDisksListAllResponse, + VirtualHardDisksGetOptionalParams, + VirtualHardDisksGetResponse, + VirtualHardDisksCreateOrUpdateOptionalParams, + VirtualHardDisksCreateOrUpdateResponse, + VirtualHardDisksDeleteOptionalParams, + VirtualHardDisksDeleteResponse, + VirtualHardDisksUpdateRequest, + VirtualHardDisksUpdateOptionalParams, + VirtualHardDisksUpdateResponse, + VirtualHardDisksListNextResponse, + VirtualHardDisksListAllNextResponse } from "../models"; /// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { +/** Class containing VirtualHardDisksOperations operations. */ +export class VirtualHardDisksOperationsImpl + implements VirtualHardDisksOperations { private readonly client: AzureStackHCIClient; /** - * Initialize a new instance of the class Clusters class. + * Initialize a new instance of the class VirtualHardDisksOperations class. * @param client Reference to the service client */ constructor(client: AzureStackHCIClient) { @@ -53,13 +55,16 @@ export class ClustersImpl implements Clusters { } /** - * List all HCI clusters in a subscription. + * 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 listBySubscription( - options?: ClustersListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); + public list( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); return { next() { return iter.next(); @@ -71,26 +76,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?: VirtualHardDisksListOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: ClustersListBySubscriptionResponse; + ): AsyncIterableIterator { + let result: VirtualHardDisksListResponse; 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 +108,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?: VirtualHardDisksListOptionalParams + ): 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 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 listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + public listAll( + options?: VirtualHardDisksListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); return { next() { return iter.next(); @@ -127,35 +137,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?: VirtualHardDisksListAllOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: ClustersListByResourceGroupResponse; + ): AsyncIterableIterator { + let result: VirtualHardDisksListAllResponse; 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 +164,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?: VirtualHardDisksListAllOptionalParams + ): 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 virtual hard disk * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param virtualHardDiskName Name of the virtual hard disk * @param options The options parameters. */ get( resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams - ): Promise { + virtualHardDiskName: string, + options?: VirtualHardDisksGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, + { resourceGroupName, virtualHardDiskName, options }, getOperationSpec ); } /** - * Create an HCI cluster. + * 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 clusterName The name of the cluster. - * @param cluster Details of the HCI cluster. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk 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>> { + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisks, + options?: VirtualHardDisksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualHardDisksCreateOrUpdateResponse + > + > { 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 +247,74 @@ 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, + 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; } /** - * Delete an HCI cluster. + * 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 clusterName The name of the cluster. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource definition. * @param options The options parameters. */ - async beginDeleteAndWait( + async beginCreateOrUpdateAndWait( resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisks, + options?: VirtualHardDisksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, - clusterName, + virtualHardDiskName, + virtualHardDisks, options ); return poller.pollUntilDone(); } /** - * Upload certificate. + * The operation to delete a virtual hard disk. * @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 virtualHardDiskName Name of the virtual hard disk * @param options The options parameters. */ - async beginUploadCertificate( + async beginDelete( resourceGroupName: string, - clusterName: string, - uploadCertificateRequest: UploadCertificateRequest, - options?: ClustersUploadCertificateOptionalParams - ): Promise, void>> { + virtualHardDiskName: string, + options?: VirtualHardDisksDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualHardDisksDeleteResponse + > + > { 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 ) => { @@ -392,65 +347,67 @@ 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, virtualHardDiskName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualHardDisksDeleteResponse, + OperationState + >(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 virtual hard disk. * @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 virtualHardDiskName Name of the virtual hard disk * @param options The options parameters. */ - async beginUploadCertificateAndWait( + async beginDeleteAndWait( resourceGroupName: string, - clusterName: string, - uploadCertificateRequest: UploadCertificateRequest, - options?: ClustersUploadCertificateOptionalParams - ): Promise { - const poller = await this.beginUploadCertificate( + virtualHardDiskName: string, + options?: VirtualHardDisksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( resourceGroupName, - clusterName, - uploadCertificateRequest, + virtualHardDiskName, options ); return poller.pollUntilDone(); } /** - * Create cluster identity. + * The operation to update a virtual hard disk. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource patch definition. * @param options The options parameters. */ - async beginCreateIdentity( + async beginUpdate( resourceGroupName: string, - clusterName: string, - options?: ClustersCreateIdentityOptionalParams + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisksUpdateRequest, + options?: VirtualHardDisksUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, - ClustersCreateIdentityResponse + SimplePollerLike< + OperationState, + VirtualHardDisksUpdateResponse > > { 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 +440,119 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - createIdentityOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + virtualHardDiskName, + virtualHardDisks, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualHardDisksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; } /** - * Create cluster identity. + * The operation to update a virtual hard disk. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param virtualHardDiskName Name of the virtual hard disk + * @param virtualHardDisks The virtual hard disk resource patch definition. * @param options The options parameters. */ - async beginCreateIdentityAndWait( + async beginUpdateAndWait( resourceGroupName: string, - clusterName: string, - options?: ClustersCreateIdentityOptionalParams - ): Promise { - const poller = await this.beginCreateIdentity( + virtualHardDiskName: string, + virtualHardDisks: VirtualHardDisksUpdateRequest, + options?: VirtualHardDisksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( resourceGroupName, - clusterName, + virtualHardDiskName, + virtualHardDisks, options ); return poller.pollUntilDone(); } /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * 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 _listBySubscriptionNext( - nextLink: string, - options?: ClustersListBySubscriptionNextOptionalParams - ): Promise { + private _list( + resourceGroupName: string, + options?: VirtualHardDisksListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec + { resourceGroupName, options }, + listOperationSpec ); } /** - * ListByResourceGroupNext + * 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 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?: VirtualHardDisksListNextOptionalParams + ): 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?: VirtualHardDisksListAllNextOptionalParams + ): 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/virtualHardDisks/{virtualHardDiskName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.VirtualHardDisks }, default: { bodyMapper: Mappers.ErrorResponse @@ -584,90 +562,117 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.virtualHardDiskName ], 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/virtualHardDisks/{virtualHardDiskName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Cluster + 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.clusterName + Parameters.virtualHardDiskName ], - 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/virtualHardDisks/{virtualHardDiskName}", + httpMethod: "DELETE", responses: { 200: { - bodyMapper: Mappers.Cluster + headersMapper: Mappers.VirtualHardDisksDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualHardDisksDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualHardDisksDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualHardDisksDeleteHeaders }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.cluster, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.virtualHardDiskName ], - 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/virtualHardDisks/{virtualHardDiskName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.Cluster + bodyMapper: Mappers.VirtualHardDisks + }, + 201: { + bodyMapper: Mappers.VirtualHardDisks + }, + 202: { + bodyMapper: Mappers.VirtualHardDisks + }, + 204: { + bodyMapper: Mappers.VirtualHardDisks }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.cluster1, + requestBody: Parameters.virtualHardDisks1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.virtualHardDiskName ], 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/virtualHardDisks", + httpMethod: "GET", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.VirtualHardDisksListResult + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -676,104 +681,62 @@ const deleteOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer }; -const uploadCertificateOperationSpec: 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 = { +const listAllOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualHardDisks", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterIdentityResponse - }, - 201: { - bodyMapper: Mappers.ClusterIdentityResponse - }, - 202: { - bodyMapper: Mappers.ClusterIdentityResponse - }, - 204: { - bodyMapper: Mappers.ClusterIdentityResponse + bodyMapper: Mappers.VirtualHardDisksListResult }, 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.VirtualHardDisksListResult }, 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.VirtualHardDisksListResult }, 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/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/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..1893d6fcc598 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/galleryImagesOperations.ts @@ -0,0 +1,149 @@ +/* + * 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, + GalleryImagesDeleteResponse, + 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< + SimplePollerLike< + OperationState, + GalleryImagesDeleteResponse + > + >; + /** + * 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..90117ffbfca8 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 "./logicalNetworksOperations"; +export * from "./marketplaceGalleryImagesOperations"; +export * from "./networkInterfacesOperations"; +export * from "./storageContainersOperations"; +export * from "./virtualHardDisksOperations"; +export * from "./virtualMachineInstances"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./guestAgentOperations"; +export * from "./guestAgents"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/logicalNetworksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/logicalNetworksOperations.ts new file mode 100644 index 000000000000..680d6f2744d0 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/logicalNetworksOperations.ts @@ -0,0 +1,148 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + LogicalNetworks, + LogicalNetworksListOptionalParams, + LogicalNetworksListAllOptionalParams, + LogicalNetworksGetOptionalParams, + LogicalNetworksGetResponse, + LogicalNetworksCreateOrUpdateOptionalParams, + LogicalNetworksCreateOrUpdateResponse, + LogicalNetworksDeleteOptionalParams, + LogicalNetworksDeleteResponse, + LogicalNetworksUpdateRequest, + LogicalNetworksUpdateOptionalParams, + LogicalNetworksUpdateResponse +} from "../models"; + +/// +/** Interface representing a LogicalNetworksOperations. */ +export interface LogicalNetworksOperations { + /** + * Lists all of the logical networks in the specified resource group. Use the nextLink property in the + * response to get the next page of logical networks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: LogicalNetworksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the logical networks in the specified subscription. Use the nextLink property in the + * response to get the next page of logical networks. + * @param options The options parameters. + */ + listAll( + options?: LogicalNetworksListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param options The options parameters. + */ + get( + resourceGroupName: string, + logicalNetworkName: string, + options?: LogicalNetworksGetOptionalParams + ): Promise; + /** + * The operation to create or update a logical network. Please note some properties can be set only + * during logical network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworks, + options?: LogicalNetworksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LogicalNetworksCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a logical network. Please note some properties can be set only + * during logical network creation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworks, + options?: LogicalNetworksCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to delete a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + logicalNetworkName: string, + options?: LogicalNetworksDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LogicalNetworksDeleteResponse + > + >; + /** + * The operation to delete a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + logicalNetworkName: string, + options?: LogicalNetworksDeleteOptionalParams + ): Promise; + /** + * The operation to update a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource patch definition. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworksUpdateRequest, + options?: LogicalNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LogicalNetworksUpdateResponse + > + >; + /** + * The operation to update a logical network. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logicalNetworkName Name of the logical network + * @param logicalNetworks The logical network resource patch definition. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + logicalNetworkName: string, + logicalNetworks: LogicalNetworksUpdateRequest, + options?: LogicalNetworksUpdateOptionalParams + ): Promise; +} 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..20260482f785 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/marketplaceGalleryImagesOperations.ts @@ -0,0 +1,149 @@ +/* + * 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, + MarketplaceGalleryImagesDeleteResponse, + 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< + SimplePollerLike< + OperationState, + MarketplaceGalleryImagesDeleteResponse + > + >; + /** + * 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..a74a22159caa --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/networkInterfacesOperations.ts @@ -0,0 +1,149 @@ +/* + * 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, + NetworkInterfacesDeleteResponse, + 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< + SimplePollerLike< + OperationState, + NetworkInterfacesDeleteResponse + > + >; + /** + * 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..15f52ac9fb73 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/storageContainersOperations.ts @@ -0,0 +1,149 @@ +/* + * 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, + StorageContainersDeleteResponse, + 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< + SimplePollerLike< + OperationState, + StorageContainersDeleteResponse + > + >; + /** + * 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..acb3fd0b0987 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualHardDisksOperations.ts @@ -0,0 +1,149 @@ +/* + * 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, + VirtualHardDisksDeleteResponse, + 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< + SimplePollerLike< + OperationState, + VirtualHardDisksDeleteResponse + > + >; + /** + * 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/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"