diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c3c5bc227ce9..d4fe52d9644e 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9114,19 +9114,19 @@ packages: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.67.1 - '@rollup/plugin-node-resolve': 13.1.3_rollup@2.67.1 + '@rollup/plugin-commonjs': 21.0.2_rollup@2.70.1 + '@rollup/plugin-json': 4.1.0_rollup@2.70.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1 + '@rollup/plugin-node-resolve': 13.1.3_rollup@2.70.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.67.1 + rollup: 2.70.1 + rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1 tslib: 2.3.1 typescript: 4.2.4 - uglify-js: 3.15.1 + uglify-js: 3.15.3 transitivePeerDependencies: - '@types/node' - debug @@ -9401,28 +9401,27 @@ packages: dev: false file:projects/arm-azurestackhci.tgz: - resolution: {integrity: sha512-49o3lKVEYQEcLbY/eA2TIza6P5yWwsDUnX7sEtAipiXuSz2k4fd1/pvbVs+Y007FZEjL+vfnFJxCj6fYaLr5Zg==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-Qz46HMD7+A8Oyfgh/RBD1hZbQHOKG1Xb+kgNnRWkvM8EJC8bpy9aDikQPIJcb6o897FKe81hwKxBdWXYNXAY1w==, tarball: file:projects/arm-azurestackhci.tgz} name: '@rush-temp/arm-azurestackhci' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.2_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1 - '@rollup/plugin-node-resolve': 13.1.3_rollup@2.70.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.70.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.3 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color diff --git a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md index 573f4aaf034b..efcd4bccee2c 100644 --- a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md @@ -1,15 +1,190 @@ # Release History + +## 3.0.0-beta.1 (2022-03-23) + +**Features** -## 2.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group GalleryimagesOperations + - Added operation group NetworkinterfacesOperations + - Added operation group VirtualharddisksOperations + - Added operation group VirtualmachinesOperations + - Added operation group VirtualnetworksOperations + - Added Interface ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable + - Added Interface ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems + - Added Interface GalleryimagesCreateOrUpdateOptionalParams + - Added Interface GalleryimagesDeleteOptionalParams + - Added Interface GalleryimagesExtendedLocation + - Added Interface GalleryimagesListByResourceGroupNextOptionalParams + - Added Interface GalleryimagesListByResourceGroupOptionalParams + - Added Interface GalleryimagesListBySubscriptionNextOptionalParams + - Added Interface GalleryimagesListBySubscriptionOptionalParams + - Added Interface GalleryimagesListResult + - Added Interface GalleryimagesPatch + - Added Interface GalleryimagesRetrieveOptionalParams + - Added Interface GalleryimagesUpdateOptionalParams + - Added Interface HardwareProfileUpdate + - Added Interface InterfaceDNSSettings + - Added Interface IpConfiguration + - Added Interface IpConfigurationProperties + - Added Interface IpConfigurationPropertiesSubnet + - Added Interface IPPool + - Added Interface IPPoolInfo + - Added Interface MOCGalleryImageStatus + - Added Interface MOCNetworkInterfaceStatus + - Added Interface MOCVirtualHardDiskStatus + - Added Interface MOCVirtualMachineStatus + - Added Interface MOCVirtualNetworkStatus + - Added Interface NetworkinterfacesCreateOrUpdateOptionalParams + - Added Interface NetworkinterfacesDeleteOptionalParams + - Added Interface NetworkinterfacesExtendedLocation + - Added Interface NetworkinterfacesListByResourceGroupNextOptionalParams + - Added Interface NetworkinterfacesListByResourceGroupOptionalParams + - Added Interface NetworkinterfacesListBySubscriptionNextOptionalParams + - Added Interface NetworkinterfacesListBySubscriptionOptionalParams + - Added Interface NetworkinterfacesListResult + - Added Interface NetworkinterfacesPatch + - Added Interface NetworkinterfacesRetrieveOptionalParams + - Added Interface NetworkinterfacesUpdateOptionalParams + - Added Interface NetworkProfileUpdate + - Added Interface NetworkProfileUpdateNetworkInterfacesItem + - Added Interface StorageProfileUpdate + - Added Interface StorageProfileUpdateDataDisksItem + - Added Interface SystemData + - Added Interface VirtualharddisksCreateOrUpdateOptionalParams + - Added Interface VirtualharddisksDeleteOptionalParams + - Added Interface VirtualharddisksExtendedLocation + - Added Interface VirtualharddisksListByResourceGroupNextOptionalParams + - Added Interface VirtualharddisksListByResourceGroupOptionalParams + - Added Interface VirtualharddisksListBySubscriptionNextOptionalParams + - Added Interface VirtualharddisksListBySubscriptionOptionalParams + - Added Interface VirtualharddisksListResult + - Added Interface VirtualharddisksPatch + - Added Interface VirtualharddisksRetrieveOptionalParams + - Added Interface VirtualharddisksUpdateOptionalParams + - Added Interface VirtualmachinesCreateOrUpdateOptionalParams + - Added Interface VirtualmachinesDeleteOptionalParams + - Added Interface VirtualmachinesExtendedLocation + - Added Interface VirtualmachinesListByResourceGroupNextOptionalParams + - Added Interface VirtualmachinesListByResourceGroupOptionalParams + - Added Interface VirtualmachinesListBySubscriptionNextOptionalParams + - Added Interface VirtualmachinesListBySubscriptionOptionalParams + - Added Interface VirtualmachinesListResult + - Added Interface VirtualmachinesPatch + - Added Interface VirtualmachinesPropertiesHardwareProfile + - Added Interface VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig + - Added Interface VirtualmachinesPropertiesNetworkProfile + - Added Interface VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem + - Added Interface VirtualmachinesPropertiesOsProfile + - Added Interface VirtualmachinesPropertiesOsProfileLinuxConfiguration + - Added Interface VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh + - Added Interface VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem + - Added Interface VirtualmachinesPropertiesOsProfileWindowsConfiguration + - Added Interface VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh + - Added Interface VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem + - Added Interface VirtualmachinesPropertiesSecurityProfile + - Added Interface VirtualmachinesPropertiesStorageProfile + - Added Interface VirtualmachinesPropertiesStorageProfileDataDisksItem + - Added Interface VirtualmachinesPropertiesStorageProfileImageReference + - Added Interface VirtualmachinesRestartOptionalParams + - Added Interface VirtualmachinesRetrieveOptionalParams + - Added Interface VirtualmachinesStartOptionalParams + - Added Interface VirtualmachinesStopOptionalParams + - Added Interface VirtualmachinesUpdateOptionalParams + - Added Interface VirtualMachineUpdateProperties + - Added Interface VirtualnetworksCreateOrUpdateOptionalParams + - Added Interface VirtualnetworksDeleteOptionalParams + - Added Interface VirtualnetworksExtendedLocation + - Added Interface VirtualnetworksListByResourceGroupNextOptionalParams + - Added Interface VirtualnetworksListByResourceGroupOptionalParams + - Added Interface VirtualnetworksListBySubscriptionNextOptionalParams + - Added Interface VirtualnetworksListBySubscriptionOptionalParams + - Added Interface VirtualnetworksListResult + - Added Interface VirtualnetworksPatch + - Added Interface VirtualnetworksPropertiesSubnetsItem + - Added Interface VirtualnetworksPropertiesSubnetsPropertiesItemsItem + - Added Interface VirtualnetworksRetrieveOptionalParams + - Added Interface VirtualnetworksUpdateOptionalParams + - Added Type Alias Galleryimages + - Added Type Alias GalleryimagesCreateOrUpdateResponse + - Added Type Alias GalleryimagesListByResourceGroupNextResponse + - Added Type Alias GalleryimagesListByResourceGroupResponse + - Added Type Alias GalleryimagesListBySubscriptionNextResponse + - Added Type Alias GalleryimagesListBySubscriptionResponse + - Added Type Alias GalleryimagesRetrieveResponse + - Added Type Alias GalleryimagesUpdateResponse + - Added Type Alias IpAllocationMethodEnum + - Added Type Alias IPPoolTypeEnum + - Added Type Alias Networkinterfaces + - Added Type Alias NetworkinterfacesCreateOrUpdateResponse + - Added Type Alias NetworkinterfacesListByResourceGroupNextResponse + - Added Type Alias NetworkinterfacesListByResourceGroupResponse + - Added Type Alias NetworkinterfacesListBySubscriptionNextResponse + - Added Type Alias NetworkinterfacesListBySubscriptionResponse + - Added Type Alias NetworkinterfacesRetrieveResponse + - Added Type Alias NetworkinterfacesUpdateResponse + - Added Type Alias NetworkTypeEnum + - Added Type Alias OperatingSystemTypes + - Added Type Alias OsTypeEnum + - Added Type Alias PowerStateEnum + - Added Type Alias PrivateIPAllocationMethodEnum + - Added Type Alias ProvisioningStateEnum + - Added Type Alias Virtualharddisks + - Added Type Alias VirtualharddisksCreateOrUpdateResponse + - Added Type Alias VirtualharddisksListByResourceGroupNextResponse + - Added Type Alias VirtualharddisksListByResourceGroupResponse + - Added Type Alias VirtualharddisksListBySubscriptionNextResponse + - Added Type Alias VirtualharddisksListBySubscriptionResponse + - Added Type Alias VirtualharddisksRetrieveResponse + - Added Type Alias VirtualharddisksUpdateResponse + - Added Type Alias Virtualmachines + - Added Type Alias VirtualmachinesCreateOrUpdateResponse + - Added Type Alias VirtualmachinesListByResourceGroupNextResponse + - Added Type Alias VirtualmachinesListByResourceGroupResponse + - Added Type Alias VirtualmachinesListBySubscriptionNextResponse + - Added Type Alias VirtualmachinesListBySubscriptionResponse + - Added Type Alias VirtualmachinesRetrieveResponse + - Added Type Alias VirtualmachinesUpdateResponse + - Added Type Alias Virtualnetworks + - Added Type Alias VirtualnetworksCreateOrUpdateResponse + - Added Type Alias VirtualnetworksListByResourceGroupNextResponse + - Added Type Alias VirtualnetworksListByResourceGroupResponse + - Added Type Alias VirtualnetworksListBySubscriptionNextResponse + - Added Type Alias VirtualnetworksListBySubscriptionResponse + - Added Type Alias VirtualnetworksRetrieveResponse + - Added Type Alias VirtualnetworksUpdateResponse + - Added Type Alias VmSizeEnum + - Interface Resource has a new optional parameter systemData + - Class AzureStackHCIClient has a new parameter galleryimagesOperations + - Class AzureStackHCIClient has a new parameter networkinterfacesOperations + - Class AzureStackHCIClient has a new parameter virtualharddisksOperations + - Class AzureStackHCIClient has a new parameter virtualmachinesOperations + - Class AzureStackHCIClient has a new parameter virtualnetworksOperations + - Added Enum KnownIpAllocationMethodEnum + - Added Enum KnownNetworkTypeEnum + - Added Enum KnownOsTypeEnum + - Added Enum KnownPowerStateEnum + - Added Enum KnownPrivateIPAllocationMethodEnum + - Added Enum KnownProvisioningStateEnum + - Added Enum KnownVmSizeEnum -### Other Changes +**Breaking Changes** + - Removed operation group ArcSettings + - Removed operation group Clusters + - Removed operation group Extensions + - 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 KnownStatus + - Removed Enum KnownWindowsServerSubscription + ## 2.1.0 (2022-02-28) **Features** diff --git a/sdk/azurestackhci/arm-azurestackhci/README.md b/sdk/azurestackhci/arm-azurestackhci/README.md index 3ca16d6e28bb..c7333c4e2cd1 100644 --- a/sdk/azurestackhci/arm-azurestackhci/README.md +++ b/sdk/azurestackhci/arm-azurestackhci/README.md @@ -16,8 +16,6 @@ Azure Stack HCI management service - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { AzureStackHCIClient } = require("@azure/arm-azurestackhci"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new AzureStackHCIClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new AzureStackHCIClient(credential, subscriptionId); ``` diff --git a/sdk/azurestackhci/arm-azurestackhci/_meta.json b/sdk/azurestackhci/arm-azurestackhci/_meta.json index bc82b9f1193f..01a72825adf3 100644 --- a/sdk/azurestackhci/arm-azurestackhci/_meta.json +++ b/sdk/azurestackhci/arm-azurestackhci/_meta.json @@ -1,7 +1,8 @@ { - "commit": "20d333fa60a4a81acfd01a7bd56dd9c552301afe", + "commit": "915b5f08530ae077d82906bb187f7b2452dbdacf", "readme": "specification/azurestackhci/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\azurestackhci\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/azurestackhci/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-beta.16" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.1", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/azurestackhci/arm-azurestackhci/package.json b/sdk/azurestackhci/arm-azurestackhci/package.json index 6878f3b95b02..41ce727fb396 100644 --- a/sdk/azurestackhci/arm-azurestackhci/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureStackHCIClient.", - "version": "2.1.1", + "version": "3.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,13 +29,13 @@ "types": "./types/arm-azurestackhci.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/azureStackHCIClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-azurestackhci?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 70c6530d63aa..b71b5e977545 100644 --- a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md +++ b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md @@ -13,72 +13,6 @@ import { PollOperationState } from '@azure/core-lro'; // @public export type ActionType = string; -// @public -export type ArcSetting = ProxyResource & { - readonly provisioningState?: ProvisioningState; - arcInstanceResourceGroup?: string; - readonly aggregateState?: ArcSettingAggregateState; - readonly perNodeDetails?: PerNodeState[]; - createdBy?: string; - createdByType?: CreatedByType; - createdAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - lastModifiedAt?: Date; -}; - -// @public -export type ArcSettingAggregateState = string; - -// @public -export interface ArcSettingList { - readonly nextLink?: string; - readonly value?: ArcSetting[]; -} - -// @public -export interface ArcSettings { - 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; - get(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsGetOptionalParams): Promise; - listByCluster(resourceGroupName: string, clusterName: string, options?: ArcSettingsListByClusterOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ArcSettingsCreateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ArcSettingsCreateResponse = ArcSetting; - -// @public -export interface ArcSettingsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ArcSettingsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ArcSettingsGetResponse = ArcSetting; - -// @public -export interface ArcSettingsListByClusterNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ArcSettingsListByClusterNextResponse = ArcSettingList; - -// @public -export interface ArcSettingsListByClusterOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ArcSettingsListByClusterResponse = ArcSettingList; - // @public (undocumented) export class AzureStackHCIClient extends coreClient.ServiceClient { // (undocumented) @@ -87,15 +21,19 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) - arcSettings: ArcSettings; - // (undocumented) - clusters: Clusters; + galleryimagesOperations: GalleryimagesOperations; // (undocumented) - extensions: Extensions; + networkinterfacesOperations: NetworkinterfacesOperations; // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; + // (undocumented) + virtualharddisksOperations: VirtualharddisksOperations; + // (undocumented) + virtualmachinesOperations: VirtualmachinesOperations; + // (undocumented) + virtualnetworksOperations: VirtualnetworksOperations; } // @public @@ -106,253 +44,191 @@ export interface AzureStackHCIClientOptionalParams extends coreClient.ServiceCli } // @public -export type Cluster = TrackedResource & { - readonly provisioningState?: ProvisioningState; - readonly status?: Status; - readonly cloudId?: string; - cloudManagementEndpoint?: string; - aadClientId?: string; - aadTenantId?: string; - desiredProperties?: ClusterDesiredProperties; - readonly reportedProperties?: ClusterReportedProperties; - readonly trialDaysRemaining?: number; - readonly billingModel?: string; - readonly registrationTimestamp?: Date; - readonly lastSyncTimestamp?: Date; - readonly lastBillingTimestamp?: Date; - createdBy?: string; - createdByType?: CreatedByType; - createdAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - lastModifiedAt?: Date; -}; +export interface ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable { + id?: string; + name?: string; + routes?: VirtualnetworksPropertiesSubnetsPropertiesItemsItem[]; + type?: string; +} // @public -export interface ClusterDesiredProperties { - diagnosticLevel?: DiagnosticLevel; - windowsServerSubscription?: WindowsServerSubscription; +export interface ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems { + id?: string; } // @public -export interface ClusterList { - readonly nextLink?: string; - value?: Cluster[]; -} +export type CreatedByType = 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 ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; } // @public -export interface ClusterPatch { - aadClientId?: string; - aadTenantId?: string; - cloudManagementEndpoint?: string; - desiredProperties?: ClusterDesiredProperties; - tags?: { - [propertyName: string]: string; - }; +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: 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 interface ErrorResponse { + error?: ErrorDetail; } // @public -export interface Clusters { - create(resourceGroupName: string, clusterName: string, cluster: Cluster, options?: ClustersCreateOptionalParams): Promise; - delete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): 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 type Galleryimages = TrackedResource & { + extendedLocation?: GalleryimagesExtendedLocation; + containerName?: string; + imagePath?: string; + osType?: OperatingSystemTypes; + provisioningState?: ProvisioningStateEnum; + resourceName?: string; + status?: MOCGalleryImageStatus; +}; // @public -export interface ClustersCreateOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ClustersCreateResponse = Cluster; +export type GalleryimagesCreateOrUpdateResponse = Galleryimages; // @public -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesDeleteOptionalParams extends coreClient.OperationOptions { } // @public -export interface ClustersGetOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesExtendedLocation { + name?: string; + type?: string; } // @public -export type ClustersGetResponse = Cluster; - -// @public -export interface ClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ClustersListByResourceGroupNextResponse = ClusterList; +export type GalleryimagesListByResourceGroupNextResponse = GalleryimagesListResult; // @public -export interface ClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesListByResourceGroupOptionalParams extends coreClient.OperationOptions { } // @public -export type ClustersListByResourceGroupResponse = ClusterList; +export type GalleryimagesListByResourceGroupResponse = GalleryimagesListResult; // @public -export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ClustersListBySubscriptionNextResponse = ClusterList; +export type GalleryimagesListBySubscriptionNextResponse = GalleryimagesListResult; // @public -export interface ClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesListBySubscriptionOptionalParams extends coreClient.OperationOptions { } // @public -export type ClustersListBySubscriptionResponse = ClusterList; +export type GalleryimagesListBySubscriptionResponse = GalleryimagesListResult; // @public -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { +export interface GalleryimagesListResult { + readonly nextLink?: string; + // (undocumented) + value?: Galleryimages[]; } // @public -export type ClustersUpdateResponse = Cluster; - -// @public -export type CreatedByType = string; - -// @public -export type DiagnosticLevel = string; - -// @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; +export interface GalleryimagesOperations { + beginCreateOrUpdate(resourceGroupName: string, galleryimagesName: string, galleryimages: Galleryimages, options?: GalleryimagesCreateOrUpdateOptionalParams): Promise, GalleryimagesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryimagesName: string, galleryimages: Galleryimages, options?: GalleryimagesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, galleryimagesName: string, options?: GalleryimagesDeleteOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: GalleryimagesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: GalleryimagesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + retrieve(resourceGroupName: string, galleryimagesName: string, options?: GalleryimagesRetrieveOptionalParams): Promise; + update(resourceGroupName: string, galleryimagesName: string, galleryimages: GalleryimagesPatch, options?: GalleryimagesUpdateOptionalParams): Promise; } // @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; +export interface GalleryimagesPatch { + tags?: { + [propertyName: string]: string; + }; } // @public -export interface ErrorResponse { - error?: ErrorDetail; +export interface GalleryimagesRetrieveOptionalParams extends coreClient.OperationOptions { } // @public -export type Extension = ProxyResource & { - readonly provisioningState?: ProvisioningState; - readonly aggregateState?: ExtensionAggregateState; - readonly perNodeExtensionDetails?: PerNodeExtensionState[]; - forceUpdateTag?: string; - publisher?: string; - typePropertiesExtensionParametersType?: string; - typeHandlerVersion?: string; - autoUpgradeMinorVersion?: boolean; - settings?: Record; - protectedSettings?: Record; - createdBy?: string; - createdByType?: CreatedByType; - createdAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - lastModifiedAt?: Date; -}; +export type GalleryimagesRetrieveResponse = Galleryimages; // @public -export type ExtensionAggregateState = string; +export interface GalleryimagesUpdateOptionalParams extends coreClient.OperationOptions { +} // @public -export interface ExtensionList { - readonly nextLink?: string; - readonly value?: Extension[]; -} +export type GalleryimagesUpdateResponse = Galleryimages; // @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 HardwareProfileUpdate { + memoryGB?: number; + processors?: number; + // (undocumented) + vmSize?: VmSizeEnum; } -// @public -export interface ExtensionsCreateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +// @public (undocumented) +export interface InterfaceDNSSettings { + dnsServers?: string[]; } // @public -export type ExtensionsCreateResponse = Extension; +export type IpAllocationMethodEnum = string; // @public -export interface ExtensionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface IpConfiguration { + name?: string; + properties?: IpConfigurationProperties; } // @public -export interface ExtensionsGetOptionalParams extends coreClient.OperationOptions { +export interface IpConfigurationProperties { + gateway?: string; + prefixLength?: string; + privateIPAddress?: string; + privateIPAllocationMethod?: PrivateIPAllocationMethodEnum; + subnet?: IpConfigurationPropertiesSubnet; } // @public -export type ExtensionsGetResponse = Extension; - -// @public -export interface ExtensionsListByArcSettingNextOptionalParams extends coreClient.OperationOptions { +export interface IpConfigurationPropertiesSubnet { + id?: string; } -// @public -export type ExtensionsListByArcSettingNextResponse = ExtensionList; - -// @public -export interface ExtensionsListByArcSettingOptionalParams extends coreClient.OperationOptions { +// @public (undocumented) +export interface IPPool { + end?: string; + // (undocumented) + info?: IPPoolInfo; + ipPoolType?: IPPoolTypeEnum; + start?: string; } -// @public -export type ExtensionsListByArcSettingResponse = ExtensionList; - -// @public -export interface ExtensionsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +// @public (undocumented) +export interface IPPoolInfo { + readonly available?: string; + readonly used?: string; } // @public -export type ExtensionsUpdateResponse = Extension; - -// @public -export type ImdsAttestation = string; +export type IPPoolTypeEnum = "vm" | "vippool"; // @public export enum KnownActionType { @@ -361,289 +237,866 @@ export enum KnownActionType { } // @public -export enum KnownArcSettingAggregateState { +export enum KnownCreatedByType { // (undocumented) - Canceled = "Canceled", + Application = "Application", // (undocumented) - Connected = "Connected", + Key = "Key", // (undocumented) - Creating = "Creating", + ManagedIdentity = "ManagedIdentity", // (undocumented) - Deleted = "Deleted", + User = "User" +} + +// @public +export enum KnownIpAllocationMethodEnum { // (undocumented) - Deleting = "Deleting", + Dynamic = "Dynamic", // (undocumented) - Disconnected = "Disconnected", + Static = "Static" +} + +// @public +export enum KnownNetworkTypeEnum { // (undocumented) - Error = "Error", + ICS = "ICS", // (undocumented) - Failed = "Failed", + Internal = "Internal", // (undocumented) - InProgress = "InProgress", + L2Bridge = "L2Bridge", // (undocumented) - Moving = "Moving", + L2Tunnel = "L2Tunnel", // (undocumented) - NotSpecified = "NotSpecified", + Mirrored = "Mirrored", // (undocumented) - PartiallyConnected = "PartiallyConnected", + NAT = "NAT", // (undocumented) - PartiallySucceeded = "PartiallySucceeded", + Overlay = "Overlay", // (undocumented) - Succeeded = "Succeeded", + Private = "Private", // (undocumented) - Updating = "Updating" + Transparent = "Transparent" } // @public -export enum KnownCreatedByType { - // (undocumented) - Application = "Application", +export enum KnownOrigin { // (undocumented) - Key = "Key", + System = "system", // (undocumented) - ManagedIdentity = "ManagedIdentity", + User = "user", // (undocumented) - User = "User" + UserSystem = "user,system" } // @public -export enum KnownDiagnosticLevel { - // (undocumented) - Basic = "Basic", +export enum KnownOsTypeEnum { // (undocumented) - Enhanced = "Enhanced", + Linux = "Linux", // (undocumented) - Off = "Off" + Windows = "Windows" } // @public -export enum KnownExtensionAggregateState { - // (undocumented) - Canceled = "Canceled", - // (undocumented) - Connected = "Connected", +export enum KnownPowerStateEnum { // (undocumented) - Creating = "Creating", + Deallocated = "Deallocated", // (undocumented) - Deleted = "Deleted", + Deallocating = "Deallocating", // (undocumented) - Deleting = "Deleting", + Running = "Running", // (undocumented) - Disconnected = "Disconnected", + Starting = "Starting", // (undocumented) - Error = "Error", + Stopped = "Stopped", // (undocumented) - Failed = "Failed", - // (undocumented) - InProgress = "InProgress", - // (undocumented) - Moving = "Moving", + Stopping = "Stopping", // (undocumented) - NotSpecified = "NotSpecified", - // (undocumented) - PartiallyConnected = "PartiallyConnected", - // (undocumented) - PartiallySucceeded = "PartiallySucceeded", + Unknown = "Unknown" +} + +// @public +export enum KnownPrivateIPAllocationMethodEnum { // (undocumented) - Succeeded = "Succeeded", + Dynamic = "Dynamic", // (undocumented) - Updating = "Updating" + Static = "Static" } // @public -export enum KnownImdsAttestation { +export enum KnownProvisioningStateEnum { + // (undocumented) + Failed = "Failed", // (undocumented) - Disabled = "Disabled", + InProgress = "InProgress", // (undocumented) - Enabled = "Enabled" + Succeeded = "Succeeded" } // @public -export enum KnownNodeArcState { - // (undocumented) - Canceled = "Canceled", +export enum KnownVmSizeEnum { // (undocumented) - Connected = "Connected", + Custom = "Custom", // (undocumented) - Creating = "Creating", + Default = "Default", // (undocumented) - Deleted = "Deleted", + StandardA2V2 = "Standard_A2_v2", // (undocumented) - Deleting = "Deleting", + StandardA4V2 = "Standard_A4_v2", // (undocumented) - Disconnected = "Disconnected", + StandardD16SV3 = "Standard_D16s_v3", // (undocumented) - Error = "Error", + StandardD2SV3 = "Standard_D2s_v3", // (undocumented) - Failed = "Failed", + StandardD32SV3 = "Standard_D32s_v3", // (undocumented) - Moving = "Moving", + StandardD4SV3 = "Standard_D4s_v3", // (undocumented) - NotSpecified = "NotSpecified", + StandardD8SV3 = "Standard_D8s_v3", // (undocumented) - Succeeded = "Succeeded", + StandardDS13V2 = "Standard_DS13_v2", // (undocumented) - Updating = "Updating" -} - -// @public -export enum KnownNodeExtensionState { + StandardDS2V2 = "Standard_DS2_v2", // (undocumented) - Canceled = "Canceled", + StandardDS3V2 = "Standard_DS3_v2", // (undocumented) - Connected = "Connected", + StandardDS4V2 = "Standard_DS4_v2", // (undocumented) - Creating = "Creating", + StandardDS5V2 = "Standard_DS5_v2", // (undocumented) - Deleted = "Deleted", + StandardK8S2V1 = "Standard_K8S2_v1", // (undocumented) - Deleting = "Deleting", + StandardK8S3V1 = "Standard_K8S3_v1", // (undocumented) - Disconnected = "Disconnected", + StandardK8S4V1 = "Standard_K8S4_v1", // (undocumented) - Error = "Error", + StandardK8S5V1 = "Standard_K8S5_v1", // (undocumented) - Failed = "Failed", + StandardK8SV1 = "Standard_K8S_v1", // (undocumented) - Moving = "Moving", + StandardNK12 = "Standard_NK12", // (undocumented) - NotSpecified = "NotSpecified", + StandardNK6 = "Standard_NK6", // (undocumented) - Succeeded = "Succeeded", + StandardNV12 = "Standard_NV12", // (undocumented) - Updating = "Updating" + StandardNV6 = "Standard_NV6" } // @public -export enum KnownOrigin { - // (undocumented) - System = "system", - // (undocumented) - User = "user", - // (undocumented) - UserSystem = "user,system" +export interface MOCGalleryImageStatus { + errorCode?: string; + errorMessage?: string; } // @public -export enum KnownProvisioningState { - // (undocumented) - Accepted = "Accepted", - // (undocumented) - Canceled = "Canceled", - // (undocumented) - Failed = "Failed", - // (undocumented) - Provisioning = "Provisioning", - // (undocumented) - Succeeded = "Succeeded" +export interface MOCNetworkInterfaceStatus { + errorCode?: string; + errorMessage?: string; } // @public -export enum KnownStatus { - // (undocumented) - ConnectedRecently = "ConnectedRecently", - // (undocumented) - Disconnected = "Disconnected", - // (undocumented) - Error = "Error", - // (undocumented) - NotConnectedRecently = "NotConnectedRecently", - // (undocumented) - NotYetRegistered = "NotYetRegistered" +export interface MOCVirtualHardDiskStatus { + errorCode?: string; + errorMessage?: string; } // @public -export enum KnownWindowsServerSubscription { - // (undocumented) - Disabled = "Disabled", - // (undocumented) - Enabled = "Enabled" +export interface MOCVirtualMachineStatus { + errorCode?: string; + errorMessage?: string; + powerState?: PowerStateEnum; } // @public -export type NodeArcState = string; +export interface MOCVirtualNetworkStatus { + errorCode?: string; + errorMessage?: string; +} // @public -export type NodeExtensionState = string; +export type Networkinterfaces = TrackedResource & { + extendedLocation?: NetworkinterfacesExtendedLocation; + ipConfigurations?: IpConfiguration[]; + macAddress?: string; + dnsSettings?: InterfaceDNSSettings; + provisioningState?: ProvisioningStateEnum; + resourceName?: string; + status?: MOCNetworkInterfaceStatus; +}; // @public -export interface Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; +export interface NetworkinterfacesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} +export type NetworkinterfacesCreateOrUpdateResponse = Networkinterfaces; // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; +export interface NetworkinterfacesDeleteOptionalParams extends coreClient.OperationOptions { } -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): Promise; +// @public (undocumented) +export interface NetworkinterfacesExtendedLocation { + name?: string; + type?: string; } // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface NetworkinterfacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } // @public -export type OperationsListResponse = OperationListResult; +export type NetworkinterfacesListByResourceGroupNextResponse = NetworkinterfacesListResult; // @public -export type Origin = string; +export interface NetworkinterfacesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} // @public -export interface PerNodeExtensionState { - readonly extension?: string; - readonly name?: string; - readonly state?: NodeExtensionState; -} +export type NetworkinterfacesListByResourceGroupResponse = NetworkinterfacesListResult; // @public -export interface PerNodeState { - readonly arcInstance?: string; - readonly name?: string; - readonly state?: NodeArcState; +export interface NetworkinterfacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ProvisioningState = string; +export type NetworkinterfacesListBySubscriptionNextResponse = NetworkinterfacesListResult; // @public -export type ProxyResource = Resource & {}; +export interface NetworkinterfacesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} // @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly type?: string; +export type NetworkinterfacesListBySubscriptionResponse = NetworkinterfacesListResult; + +// @public (undocumented) +export interface NetworkinterfacesListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: Networkinterfaces[]; } // @public -export type Status = string; +export interface NetworkinterfacesOperations { + // (undocumented) + beginCreateOrUpdate(resourceGroupName: string, networkinterfacesName: string, networkinterfaces: Networkinterfaces, options?: NetworkinterfacesCreateOrUpdateOptionalParams): Promise, NetworkinterfacesCreateOrUpdateResponse>>; + // (undocumented) + beginCreateOrUpdateAndWait(resourceGroupName: string, networkinterfacesName: string, networkinterfaces: Networkinterfaces, options?: NetworkinterfacesCreateOrUpdateOptionalParams): Promise; + // (undocumented) + delete(resourceGroupName: string, networkinterfacesName: string, options?: NetworkinterfacesDeleteOptionalParams): Promise; + // (undocumented) + listByResourceGroup(resourceGroupName: string, options?: NetworkinterfacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + listBySubscription(options?: NetworkinterfacesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + retrieve(resourceGroupName: string, networkinterfacesName: string, options?: NetworkinterfacesRetrieveOptionalParams): Promise; + // (undocumented) + update(resourceGroupName: string, networkinterfacesName: string, networkinterfaces: NetworkinterfacesPatch, options?: NetworkinterfacesUpdateOptionalParams): Promise; +} // @public -export type TrackedResource = Resource & { +export interface NetworkinterfacesPatch { tags?: { [propertyName: string]: string; }; - location: string; -}; +} + +// @public +export interface NetworkinterfacesRetrieveOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkinterfacesRetrieveResponse = Networkinterfaces; + +// @public +export interface NetworkinterfacesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkinterfacesUpdateResponse = Networkinterfaces; + +// @public +export interface NetworkProfileUpdate { + networkInterfaces?: NetworkProfileUpdateNetworkInterfacesItem[]; +} + +// @public (undocumented) +export interface NetworkProfileUpdateNetworkInterfacesItem { + id?: string; +} + +// @public +export type NetworkTypeEnum = string; + +// @public +export type OperatingSystemTypes = "Windows" | "Linux"; + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): Promise; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export type Origin = string; + +// @public +export type OsTypeEnum = string; + +// @public +export type PowerStateEnum = string; + +// @public +export type PrivateIPAllocationMethodEnum = string; + +// @public +export type ProvisioningStateEnum = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public (undocumented) +export interface StorageProfileUpdate { + dataDisks?: StorageProfileUpdateDataDisksItem[]; +} + +// @public (undocumented) +export interface StorageProfileUpdateDataDisksItem { + // (undocumented) + name?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export type Virtualharddisks = TrackedResource & { + extendedLocation?: VirtualharddisksExtendedLocation; + blockSizeBytes?: number; + diskSizeBytes?: number; + dynamic?: boolean; + logicalSectorBytes?: number; + physicalSectorBytes?: number; + provisioningState?: ProvisioningStateEnum; + resourceName?: string; + status?: MOCVirtualHardDiskStatus; +}; + +// @public +export interface VirtualharddisksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualharddisksCreateOrUpdateResponse = Virtualharddisks; + +// @public +export interface VirtualharddisksDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public (undocumented) +export interface VirtualharddisksExtendedLocation { + name?: string; + type?: string; +} + +// @public +export interface VirtualharddisksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualharddisksListByResourceGroupNextResponse = VirtualharddisksListResult; + +// @public +export interface VirtualharddisksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualharddisksListByResourceGroupResponse = VirtualharddisksListResult; + +// @public +export interface VirtualharddisksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualharddisksListBySubscriptionNextResponse = VirtualharddisksListResult; + +// @public +export interface VirtualharddisksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualharddisksListBySubscriptionResponse = VirtualharddisksListResult; + +// @public (undocumented) +export interface VirtualharddisksListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: Virtualharddisks[]; +} + +// @public +export interface VirtualharddisksOperations { + // (undocumented) + beginCreateOrUpdate(resourceGroupName: string, virtualharddisksName: string, virtualharddisks: Virtualharddisks, options?: VirtualharddisksCreateOrUpdateOptionalParams): Promise, VirtualharddisksCreateOrUpdateResponse>>; + // (undocumented) + beginCreateOrUpdateAndWait(resourceGroupName: string, virtualharddisksName: string, virtualharddisks: Virtualharddisks, options?: VirtualharddisksCreateOrUpdateOptionalParams): Promise; + // (undocumented) + delete(resourceGroupName: string, virtualharddisksName: string, options?: VirtualharddisksDeleteOptionalParams): Promise; + // (undocumented) + listByResourceGroup(resourceGroupName: string, options?: VirtualharddisksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + listBySubscription(options?: VirtualharddisksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + retrieve(resourceGroupName: string, virtualharddisksName: string, options?: VirtualharddisksRetrieveOptionalParams): Promise; + // (undocumented) + update(resourceGroupName: string, virtualharddisksName: string, virtualharddisks: VirtualharddisksPatch, options?: VirtualharddisksUpdateOptionalParams): Promise; +} + +// @public +export interface VirtualharddisksPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface VirtualharddisksRetrieveOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualharddisksRetrieveResponse = Virtualharddisks; + +// @public +export interface VirtualharddisksUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualharddisksUpdateResponse = Virtualharddisks; + +// @public +export type Virtualmachines = TrackedResource & { + extendedLocation?: VirtualmachinesExtendedLocation; + hardwareProfile?: VirtualmachinesPropertiesHardwareProfile; + networkProfile?: VirtualmachinesPropertiesNetworkProfile; + osProfile?: VirtualmachinesPropertiesOsProfile; + resourceName?: string; + securityProfile?: VirtualmachinesPropertiesSecurityProfile; + storageProfile?: VirtualmachinesPropertiesStorageProfile; + provisioningState?: ProvisioningStateEnum; + status?: MOCVirtualMachineStatus; +}; + +// @public +export interface VirtualmachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualmachinesCreateOrUpdateResponse = Virtualmachines; + +// @public +export interface VirtualmachinesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public (undocumented) +export interface VirtualmachinesExtendedLocation { + name?: string; + type?: string; +} + +// @public +export interface VirtualmachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualmachinesListByResourceGroupNextResponse = VirtualmachinesListResult; + +// @public +export interface VirtualmachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualmachinesListByResourceGroupResponse = VirtualmachinesListResult; + +// @public +export interface VirtualmachinesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualmachinesListBySubscriptionNextResponse = VirtualmachinesListResult; + +// @public +export interface VirtualmachinesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualmachinesListBySubscriptionResponse = VirtualmachinesListResult; + +// @public (undocumented) +export interface VirtualmachinesListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: Virtualmachines[]; +} + +// @public +export interface VirtualmachinesOperations { + // (undocumented) + beginCreateOrUpdate(resourceGroupName: string, virtualmachinesName: string, virtualmachines: Virtualmachines, options?: VirtualmachinesCreateOrUpdateOptionalParams): Promise, VirtualmachinesCreateOrUpdateResponse>>; + // (undocumented) + beginCreateOrUpdateAndWait(resourceGroupName: string, virtualmachinesName: string, virtualmachines: Virtualmachines, options?: VirtualmachinesCreateOrUpdateOptionalParams): Promise; + // (undocumented) + beginRestart(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesRestartOptionalParams): Promise, void>>; + // (undocumented) + beginRestartAndWait(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesRestartOptionalParams): Promise; + // (undocumented) + beginStart(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesStartOptionalParams): Promise, void>>; + // (undocumented) + beginStartAndWait(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesStartOptionalParams): Promise; + // (undocumented) + beginStop(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesStopOptionalParams): Promise, void>>; + // (undocumented) + beginStopAndWait(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesStopOptionalParams): Promise; + // (undocumented) + delete(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesDeleteOptionalParams): Promise; + // (undocumented) + listByResourceGroup(resourceGroupName: string, options?: VirtualmachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + listBySubscription(options?: VirtualmachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + retrieve(resourceGroupName: string, virtualmachinesName: string, options?: VirtualmachinesRetrieveOptionalParams): Promise; + // (undocumented) + update(resourceGroupName: string, virtualmachinesName: string, virtualmachines: VirtualmachinesPatch, options?: VirtualmachinesUpdateOptionalParams): Promise; +} + +// @public +export interface VirtualmachinesPatch { + properties?: VirtualMachineUpdateProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface VirtualmachinesPropertiesHardwareProfile { + // (undocumented) + dynamicMemoryConfig?: VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig; + memoryGB?: number; + processors?: number; + // (undocumented) + vmSize?: string; +} + +// @public (undocumented) +export interface VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig { + // (undocumented) + maximumMemoryGB?: number; + // (undocumented) + minimumMemoryGB?: number; + // (undocumented) + targetMemoryBuffer?: number; +} + +// @public +export interface VirtualmachinesPropertiesNetworkProfile { + networkInterfaces?: VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem[]; +} + +// @public (undocumented) +export interface VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem { + id?: string; +} + +// @public +export interface VirtualmachinesPropertiesOsProfile { + adminPassword?: string; + adminUsername?: string; + computerName?: string; + linuxConfiguration?: VirtualmachinesPropertiesOsProfileLinuxConfiguration; + osType?: OsTypeEnum; + windowsConfiguration?: VirtualmachinesPropertiesOsProfileWindowsConfiguration; +} + +// @public +export interface VirtualmachinesPropertiesOsProfileLinuxConfiguration { + disablePasswordAuthentication?: boolean; + ssh?: VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh; +} + +// @public +export interface VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh { + publicKeys?: VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem[]; +} + +// @public (undocumented) +export interface VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem { + keyData?: string; + path?: string; +} + +// @public +export interface VirtualmachinesPropertiesOsProfileWindowsConfiguration { + enableAutomaticUpdates?: boolean; + ssh?: VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh; + timeZone?: string; +} + +// @public +export interface VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh { + publicKeys?: VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem[]; +} + +// @public (undocumented) +export interface VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem { + keyData?: string; + path?: string; +} + +// @public +export interface VirtualmachinesPropertiesSecurityProfile { + // (undocumented) + enableTPM?: boolean; +} + +// @public +export interface VirtualmachinesPropertiesStorageProfile { + dataDisks?: VirtualmachinesPropertiesStorageProfileDataDisksItem[]; + imageReference?: VirtualmachinesPropertiesStorageProfileImageReference; +} + +// @public (undocumented) +export interface VirtualmachinesPropertiesStorageProfileDataDisksItem { + // (undocumented) + name?: string; +} + +// @public +export interface VirtualmachinesPropertiesStorageProfileImageReference { + name?: string; +} + +// @public +export interface VirtualmachinesRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualmachinesRetrieveOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualmachinesRetrieveResponse = Virtualmachines; + +// @public +export interface VirtualmachinesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualmachinesStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualmachinesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualmachinesUpdateResponse = Virtualmachines; + +// @public +export interface VirtualMachineUpdateProperties { + hardwareProfile?: HardwareProfileUpdate; + networkProfile?: NetworkProfileUpdate; + // (undocumented) + storageProfile?: StorageProfileUpdate; +} + +// @public +export type Virtualnetworks = TrackedResource & { + extendedLocation?: VirtualnetworksExtendedLocation; + networkType?: NetworkTypeEnum; + subnets?: VirtualnetworksPropertiesSubnetsItem[]; + provisioningState?: ProvisioningStateEnum; + resourceName?: string; + status?: MOCVirtualNetworkStatus; +}; + +// @public +export interface VirtualnetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualnetworksCreateOrUpdateResponse = Virtualnetworks; + +// @public +export interface VirtualnetworksDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public (undocumented) +export interface VirtualnetworksExtendedLocation { + name?: string; + type?: string; +} + +// @public +export interface VirtualnetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualnetworksListByResourceGroupNextResponse = VirtualnetworksListResult; + +// @public +export interface VirtualnetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualnetworksListByResourceGroupResponse = VirtualnetworksListResult; + +// @public +export interface VirtualnetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualnetworksListBySubscriptionNextResponse = VirtualnetworksListResult; + +// @public +export interface VirtualnetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualnetworksListBySubscriptionResponse = VirtualnetworksListResult; + +// @public (undocumented) +export interface VirtualnetworksListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value?: Virtualnetworks[]; +} + +// @public +export interface VirtualnetworksOperations { + // (undocumented) + beginCreateOrUpdate(resourceGroupName: string, virtualnetworksName: string, virtualnetworks: Virtualnetworks, options?: VirtualnetworksCreateOrUpdateOptionalParams): Promise, VirtualnetworksCreateOrUpdateResponse>>; + // (undocumented) + beginCreateOrUpdateAndWait(resourceGroupName: string, virtualnetworksName: string, virtualnetworks: Virtualnetworks, options?: VirtualnetworksCreateOrUpdateOptionalParams): Promise; + // (undocumented) + delete(resourceGroupName: string, virtualnetworksName: string, options?: VirtualnetworksDeleteOptionalParams): Promise; + // (undocumented) + listByResourceGroup(resourceGroupName: string, options?: VirtualnetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + listBySubscription(options?: VirtualnetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + // (undocumented) + retrieve(resourceGroupName: string, virtualnetworksName: string, options?: VirtualnetworksRetrieveOptionalParams): Promise; + // (undocumented) + update(resourceGroupName: string, virtualnetworksName: string, virtualnetworks: VirtualnetworksPatch, options?: VirtualnetworksUpdateOptionalParams): Promise; +} + +// @public +export interface VirtualnetworksPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface VirtualnetworksPropertiesSubnetsItem { + addressPrefix?: string; + addressPrefixes?: string[]; + ipAllocationMethod?: IpAllocationMethodEnum; + ipConfigurationReferences?: ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems[]; + ipPools?: IPPool[]; + name?: string; + routeTable?: ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable; + vlan?: number; +} + +// @public +export interface VirtualnetworksPropertiesSubnetsPropertiesItemsItem { + addressPrefix?: string; + name?: string; + nextHopIpAddress?: string; +} + +// @public +export interface VirtualnetworksRetrieveOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualnetworksRetrieveResponse = Virtualnetworks; + +// @public +export interface VirtualnetworksUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualnetworksUpdateResponse = Virtualnetworks; // @public -export type WindowsServerSubscription = string; +export type VmSizeEnum = string; // (No @packageDocumentation comment for this package) diff --git a/sdk/azurestackhci/arm-azurestackhci/rollup.config.js b/sdk/azurestackhci/arm-azurestackhci/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/azurestackhci/arm-azurestackhci/rollup.config.js +++ b/sdk/azurestackhci/arm-azurestackhci/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts index 511c3d34ad9c..a871ea9438a8 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts @@ -9,15 +9,19 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { - ArcSettingsImpl, - ClustersImpl, - ExtensionsImpl, + GalleryimagesOperationsImpl, + NetworkinterfacesOperationsImpl, + VirtualharddisksOperationsImpl, + VirtualmachinesOperationsImpl, + VirtualnetworksOperationsImpl, OperationsImpl } from "./operations"; import { - ArcSettings, - Clusters, - Extensions, + GalleryimagesOperations, + NetworkinterfacesOperations, + VirtualharddisksOperations, + VirtualmachinesOperations, + VirtualnetworksOperations, Operations } from "./operationsInterfaces"; import { AzureStackHCIClientOptionalParams } from "./models"; @@ -54,7 +58,7 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-azurestackhci/2.1.1`; + const packageDetails = `azsdk-js-arm-azurestackhci/3.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -77,15 +81,21 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-01-01"; - this.arcSettings = new ArcSettingsImpl(this); - this.clusters = new ClustersImpl(this); - this.extensions = new ExtensionsImpl(this); + this.apiVersion = options.apiVersion || "2021-07-01-preview"; + this.galleryimagesOperations = new GalleryimagesOperationsImpl(this); + this.networkinterfacesOperations = new NetworkinterfacesOperationsImpl( + this + ); + this.virtualharddisksOperations = new VirtualharddisksOperationsImpl(this); + this.virtualmachinesOperations = new VirtualmachinesOperationsImpl(this); + this.virtualnetworksOperations = new VirtualnetworksOperationsImpl(this); this.operations = new OperationsImpl(this); } - arcSettings: ArcSettings; - clusters: Clusters; - extensions: Extensions; + galleryimagesOperations: GalleryimagesOperations; + networkinterfacesOperations: NetworkinterfacesOperations; + virtualharddisksOperations: VirtualharddisksOperations; + virtualmachinesOperations: VirtualmachinesOperations; + virtualnetworksOperations: VirtualnetworksOperations; operations: Operations; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts index d78b95910e18..89ebeb43efd3 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts @@ -8,37 +8,20 @@ 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; +/** MOCGalleryImageStatus defines the desired state of MOCGalleryImage */ +export interface MOCGalleryImageStatus { + /** GalleryImage provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: 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; - /** - * State of Arc agent in this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: NodeArcState; +/** The extendedLocation of the resource. */ +export interface GalleryimagesExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ @@ -58,6 +41,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,10 +113,15 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** List of clusters. */ -export interface ClusterList { - /** List of clusters. */ - value?: Cluster[]; +/** The galleryimages resource patch definition. */ +export interface GalleryimagesPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** List of galleryimages. */ +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. @@ -120,149 +129,364 @@ 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; +/** 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; } -/** Properties reported by cluster agent. */ -export interface ClusterReportedProperties { - /** - * Name of the on-prem cluster connected to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterName?: string; - /** - * Unique id generated by the on-prem cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * Version of the cluster software. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterVersion?: string; - /** - * List of nodes reported by the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nodes?: ClusterNode[]; - /** - * Last time the cluster reported the data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastUpdated?: Date; - /** - * IMDS attestation status of the cluster. - * 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; +/** InterfaceIPConfigurationPropertiesFormat properties of IP configuration. */ +export interface IpConfigurationProperties { + /** Gateway for network interface */ + gateway?: string; + /** prefixLength for network interface */ + prefixLength?: string; + /** PrivateIPAddress - Private IP address of the IP configuration. */ + privateIPAddress?: string; + /** PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' */ + privateIPAllocationMethod?: PrivateIPAllocationMethodEnum; + /** Subnet - Name of Subnet bound to the IP configuration. */ + subnet?: IpConfigurationPropertiesSubnet; } -/** 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; - /** - * Id of the node in the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: number; - /** - * State of Windows Server Subscription. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly windowsServerSubscription?: WindowsServerSubscription; - /** - * Manufacturer of the cluster node hardware. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly manufacturer?: string; - /** - * Model name of the cluster node hardware. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly model?: string; - /** - * Operating system running on the cluster node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osName?: string; - /** - * Version of the operating system running on the cluster node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osVersion?: string; - /** - * Immutable id of the cluster node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serialNumber?: string; - /** - * Number of physical cores on the cluster node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly coreCount?: number; - /** - * Total available memory on the cluster node (in GiB). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memoryInGiB?: number; +/** 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; } -/** Cluster details to update. */ -export interface ClusterPatch { - /** Resource tags. */ +export interface InterfaceDNSSettings { + /** List of DNS server IP Addresses for the interface */ + dnsServers?: string[]; +} + +/** MOCNetworkInterfaceStatus defines the desired state of MOCNetworkInterface */ +export interface MOCNetworkInterfaceStatus { + /** NetworkInterface provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; +} + +export interface NetworkinterfacesExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +/** The networkinterfaces resource patch definition. */ +export interface NetworkinterfacesPatch { + /** 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; -} - -/** List of Extensions in HCI cluster. */ -export interface ExtensionList { - /** - * List of Extensions in HCI cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Extension[]; - /** - * 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; } -/** Status of Arc Extension for a particular node in HCI Cluster. */ -export interface PerNodeExtensionState { - /** - * 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; +export interface NetworkinterfacesListResult { + value?: Networkinterfaces[]; + nextLink?: string; +} + +/** MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk */ +export interface MOCVirtualHardDiskStatus { + /** NetworkInterface provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; +} + +export interface VirtualharddisksExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +/** The virtualharddisks resource patch definition. */ +export interface VirtualharddisksPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface VirtualharddisksListResult { + value?: Virtualharddisks[]; + nextLink?: string; +} + +/** HardwareProfile - Specifies the hardware settings for the virtual machine. */ +export interface VirtualmachinesPropertiesHardwareProfile { + vmSize?: string; + /** number of processors for the virtual machine */ + processors?: number; + /** RAM in gb for the virtual machine */ + memoryGB?: number; + dynamicMemoryConfig?: VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig; +} + +export interface VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig { + maximumMemoryGB?: number; + minimumMemoryGB?: number; + targetMemoryBuffer?: number; +} + +/** NetworkProfile - describes the network configuration the virtual machine */ +export interface VirtualmachinesPropertiesNetworkProfile { + /** NetworkInterfaces - list of network interfaces to be attached to the virtual machine */ + networkInterfaces?: VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem[]; +} + +export interface VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem { + /** Name of the network interface */ + id?: string; +} + +/** OsProfile - describes the configuration of the operating system and sets login data */ +export interface VirtualmachinesPropertiesOsProfile { + /** 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 */ + linuxConfiguration?: VirtualmachinesPropertiesOsProfileLinuxConfiguration; + /** OsType - string specifying whether the OS is Linux or Windows */ + osType?: OsTypeEnum; + /** Windows Configuration for the virtual machine */ + windowsConfiguration?: VirtualmachinesPropertiesOsProfileWindowsConfiguration; +} + +/** LinuxConfiguration - linux specific configuration values for the virtual machine */ +export interface VirtualmachinesPropertiesOsProfileLinuxConfiguration { + /** DisablePasswordAuthentication - whether password authentication should be disabled */ + disablePasswordAuthentication?: boolean; + /** SSH - contains settings related to ssh configuration */ + ssh?: VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh; +} + +/** SSH - contains settings related to ssh configuration */ +export interface VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh { + /** PublicKeys - The list of SSH public keys used to authenticate with linux based VMs. */ + publicKeys?: VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem[]; +} + +export interface VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem { + /** KeyData - 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 Li nux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). */ + keyData?: string; + /** Path - 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; +} + +/** Windows Configuration for the virtual machine */ +export interface VirtualmachinesPropertiesOsProfileWindowsConfiguration { + /** Whether to EnableAutomaticUpdates on the machine */ + enableAutomaticUpdates?: boolean; + /** SSH Configuration */ + ssh?: VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh; + /** TimeZone for the virtual machine */ + timeZone?: string; +} + +/** SSH Configuration */ +export interface VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh { + /** PublicKeys - The list of SSH public keys used to authenticate with linux based VMs. */ + publicKeys?: VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem[]; +} + +export interface VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem { + /** KeyData - 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 Li nux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). */ + keyData?: string; + /** Path - 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; +} + +/** SecurityProfile - Specifies the security settings for the virtual machine. */ +export interface VirtualmachinesPropertiesSecurityProfile { + enableTPM?: boolean; +} + +/** StorageProfile - contains information about the disks and storage information for the virtual machine */ +export interface VirtualmachinesPropertiesStorageProfile { + /** adds data disks to the virtual machine */ + dataDisks?: VirtualmachinesPropertiesStorageProfileDataDisksItem[]; + /** Which Image to use for the virtual machine */ + imageReference?: VirtualmachinesPropertiesStorageProfileImageReference; +} + +export interface VirtualmachinesPropertiesStorageProfileDataDisksItem { + name?: string; +} + +/** Which Image to use for the virtual machine */ +export interface VirtualmachinesPropertiesStorageProfileImageReference { + /** Name - Name of the image */ + name?: string; +} + +/** MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine */ +export interface MOCVirtualMachineStatus { + /** PowerState of the VM */ + powerState?: PowerStateEnum; + /** VM provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; +} + +export interface VirtualmachinesExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +/** The virtualmachines resource patch definition. */ +export interface VirtualmachinesPatch { + /** Defines the resource properties for the update. */ + properties?: VirtualMachineUpdateProperties; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** Defines the resource properties for the update. */ +export interface VirtualMachineUpdateProperties { + /** HardwareProfile - Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: HardwareProfileUpdate; + storageProfile?: StorageProfileUpdate; + /** NetworkProfile - describes the network update configuration the virtual machine */ + networkProfile?: NetworkProfileUpdate; +} + +/** HardwareProfile - Specifies the hardware settings for the virtual machine. */ +export interface HardwareProfileUpdate { + vmSize?: VmSizeEnum; + /** number of processors for the virtual machine */ + processors?: number; + /** RAM in gb for the virtual machine */ + memoryGB?: number; +} + +export interface StorageProfileUpdate { + /** adds data disks to the virtual machine for the update call */ + dataDisks?: StorageProfileUpdateDataDisksItem[]; +} + +export interface StorageProfileUpdateDataDisksItem { + name?: string; +} + +/** NetworkProfile - describes the network update configuration the virtual machine */ +export interface NetworkProfileUpdate { + /** NetworkInterfaces - list of network interfaces to be attached to the virtual machine */ + networkInterfaces?: NetworkProfileUpdateNetworkInterfacesItem[]; +} + +export interface NetworkProfileUpdateNetworkInterfacesItem { + /** Name of the network interface */ + id?: string; +} + +export interface VirtualmachinesListResult { + value?: Virtualmachines[]; + nextLink?: string; +} + +/** Subnet subnet in a virtual network resource. */ +export interface VirtualnetworksPropertiesSubnetsItem { + /** Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** Cidr for this subnet - IPv4, IPv6 */ + addressPrefix?: string; + /** AddressPrefixes - List of address prefixes for the subnet. */ + addressPrefixes?: string[]; + /** IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic' */ + ipAllocationMethod?: IpAllocationMethodEnum; + /** IPConfigurationReferences - list of IPConfigurationReferences */ + ipConfigurationReferences?: ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems[]; + /** RouteTable for the subnet */ + routeTable?: ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable; + /** 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 ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems { + /** Name of the Ip Configuration */ + id?: string; +} + +/** RouteTable for the subnet */ +export interface ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable { + /** Etag - Gets a unique read-only string that changes whenever the resource is updated. */ + id?: string; + /** Name - READ-ONLY; Resource name. */ + name?: string; + /** Type - READ-ONLY; Resource type. */ + type?: string; + /** Routes - Collection of routes contained within a route table. */ + routes?: VirtualnetworksPropertiesSubnetsPropertiesItemsItem[]; +} + +/** Route is associated with a subnet. */ +export interface VirtualnetworksPropertiesSubnetsPropertiesItemsItem { + /** Name - name of the subnet */ + name?: string; + /** AddressPrefix - The destination CIDR to which the route applies. */ + addressPrefix?: string; + /** NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. */ + nextHopIpAddress?: string; +} + +export interface IPPool { + /** ip pool type */ + ipPoolType?: IPPoolTypeEnum; + /** First IP of the pool */ + start?: string; + /** Last IP of the pool */ + end?: string; + info?: IPPoolInfo; +} + +export interface IPPoolInfo { /** - * Fully qualified resource ID for the particular Arc Extension on this node. + * no. of ip addresses allocated from the ip pool * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly extension?: string; + readonly used?: string; /** - * State of Arc Extension in this node. + * no. of ip addresses available in the ip pool * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: NodeExtensionState; + readonly available?: string; +} + +/** MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork */ +export interface MOCVirtualNetworkStatus { + /** VirtualNetwork provisioning error code */ + errorCode?: string; + /** Descriptive error message */ + errorMessage?: string; +} + +export interface VirtualnetworksExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +/** The virtualnetworks resource patch definition. */ +export interface VirtualnetworksPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface VirtualnetworksListResult { + value?: Virtualnetworks[]; + nextLink?: string; } /** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ @@ -329,9 +553,6 @@ export interface OperationDisplay { readonly description?: string; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; - /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export type TrackedResource = Resource & { /** Resource tags. */ @@ -340,422 +561,294 @@ export type TrackedResource = Resource & { location: string; }; -/** ArcSetting details. */ -export type ArcSetting = 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; - /** - * Aggregate state of Arc agent across the nodes in this HCI cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly aggregateState?: ArcSettingAggregateState; - /** - * State of Arc agent in each of the nodes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly perNodeDetails?: PerNodeState[]; - /** 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; +/** The galleryimages resource definition. */ +export type Galleryimages = TrackedResource & { + /** The extendedLocation of the resource. */ + extendedLocation?: GalleryimagesExtendedLocation; + /** Container Name for storage container */ + containerName?: string; + /** location of the image the gallery image should be created from */ + imagePath?: string; + /** operating system type that the gallery image uses. Expected to be linux or windows */ + osType?: OperatingSystemTypes; + /** Provisioning state of the gallery image. */ + provisioningState?: ProvisioningStateEnum; + /** name of the object to be used in moc */ + resourceName?: string; + /** MOCGalleryImageStatus defines the desired state of MOCGalleryImage */ + status?: MOCGalleryImageStatus; }; -/** Details of a particular extension in HCI Cluster. */ -export type Extension = ProxyResource & { - /** - * Provisioning state of the Extension proxy resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Aggregate state of Arc Extensions across the nodes in this HCI cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly aggregateState?: ExtensionAggregateState; - /** - * State of Arc Extension in each of the nodes. - * 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; +/** The networkinterfaces resource definition. */ +export type Networkinterfaces = TrackedResource & { + extendedLocation?: NetworkinterfacesExtendedLocation; + /** 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; + /** Provisioning state of the gallery image. */ + provisioningState?: ProvisioningStateEnum; + /** name of the object to be used in moc */ + resourceName?: string; + /** MOCNetworkInterfaceStatus defines the desired state of MOCNetworkInterface */ + status?: MOCNetworkInterfaceStatus; }; -/** Cluster details. */ -export type Cluster = TrackedResource & { - /** - * Provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Status of the cluster agent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: Status; - /** - * Unique, immutable resource id. - * 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; - /** Desired properties of the cluster. */ - desiredProperties?: ClusterDesiredProperties; - /** - * Properties reported by cluster agent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reportedProperties?: ClusterReportedProperties; - /** - * Number of days remaining in the trial period. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly trialDaysRemaining?: number; - /** - * Type of billing applied to the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingModel?: string; - /** - * First cluster sync timestamp. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly registrationTimestamp?: Date; - /** - * Most recent cluster sync timestamp. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastSyncTimestamp?: Date; - /** - * Most recent billing meter timestamp. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastBillingTimestamp?: Date; - /** 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; +/** The virtualharddisks resource definition. */ +export type Virtualharddisks = TrackedResource & { + extendedLocation?: VirtualharddisksExtendedLocation; + blockSizeBytes?: number; + /** diskSizeBytes - size of the disk in GB */ + diskSizeBytes?: number; + /** Boolean for enabling dynamic sizing on the virtual hard disk */ + dynamic?: boolean; + logicalSectorBytes?: number; + physicalSectorBytes?: number; + /** Provisioning state of the gallery image. */ + provisioningState?: ProvisioningStateEnum; + /** name of the object to be used in moc */ + resourceName?: string; + /** MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk */ + status?: MOCVirtualHardDiskStatus; }; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - User = "User", - Application = "Application", - ManagedIdentity = "ManagedIdentity", - 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 CreatedByType = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - Succeeded = "Succeeded", - Failed = "Failed", - Canceled = "Canceled", - Accepted = "Accepted", - Provisioning = "Provisioning" -} +/** The virtualmachines resource definition. */ +export type Virtualmachines = TrackedResource & { + extendedLocation?: VirtualmachinesExtendedLocation; + /** HardwareProfile - Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: VirtualmachinesPropertiesHardwareProfile; + /** NetworkProfile - describes the network configuration the virtual machine */ + networkProfile?: VirtualmachinesPropertiesNetworkProfile; + /** OsProfile - describes the configuration of the operating system and sets login data */ + osProfile?: VirtualmachinesPropertiesOsProfile; + /** name of the object to be used in moc */ + resourceName?: string; + /** SecurityProfile - Specifies the security settings for the virtual machine. */ + securityProfile?: VirtualmachinesPropertiesSecurityProfile; + /** StorageProfile - contains information about the disks and storage information for the virtual machine */ + storageProfile?: VirtualmachinesPropertiesStorageProfile; + /** Provisioning state of the gallery image. */ + provisioningState?: ProvisioningStateEnum; + /** MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine */ + status?: MOCVirtualMachineStatus; +}; -/** - * 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; +/** The virtualnetworks resource definition. */ +export type Virtualnetworks = TrackedResource & { + extendedLocation?: VirtualnetworksExtendedLocation; + /** Type of the network */ + networkType?: NetworkTypeEnum; + /** Subnet - list of subnets under the virtual network */ + subnets?: VirtualnetworksPropertiesSubnetsItem[]; + /** Provisioning state of the gallery image. */ + provisioningState?: ProvisioningStateEnum; + /** name of the object to be used in moc */ + resourceName?: string; + /** MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork */ + status?: MOCVirtualNetworkStatus; +}; -/** Known values of {@link ArcSettingAggregateState} that the service accepts. */ -export enum KnownArcSettingAggregateState { - NotSpecified = "NotSpecified", - Error = "Error", +/** Known values of {@link ProvisioningStateEnum} that the service accepts. */ +export enum KnownProvisioningStateEnum { Succeeded = "Succeeded", - Canceled = "Canceled", Failed = "Failed", - Connected = "Connected", - Disconnected = "Disconnected", - Deleted = "Deleted", - Creating = "Creating", - Updating = "Updating", - Deleting = "Deleting", - Moving = "Moving", - PartiallySucceeded = "PartiallySucceeded", - PartiallyConnected = "PartiallyConnected", InProgress = "InProgress" } /** - * Defines values for ArcSettingAggregateState. \ - * {@link KnownArcSettingAggregateState} can be used interchangeably with ArcSettingAggregateState, + * 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** \ - * **Deleting** \ - * **Moving** \ - * **PartiallySucceeded** \ - * **PartiallyConnected** \ * **InProgress** */ -export type ArcSettingAggregateState = string; +export type ProvisioningStateEnum = string; -/** Known values of {@link NodeArcState} that the service accepts. */ -export enum KnownNodeArcState { - NotSpecified = "NotSpecified", - Error = "Error", - Succeeded = "Succeeded", - Canceled = "Canceled", - Failed = "Failed", - Connected = "Connected", - Disconnected = "Disconnected", - Deleted = "Deleted", - Creating = "Creating", - Updating = "Updating", - Deleting = "Deleting", - Moving = "Moving" +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * Defines values for NodeArcState. \ - * {@link KnownNodeArcState} can be used interchangeably with NodeArcState, + * 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 - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export type NodeArcState = string; +export type CreatedByType = string; -/** Known values of {@link Status} that the service accepts. */ -export enum KnownStatus { - NotYetRegistered = "NotYetRegistered", - ConnectedRecently = "ConnectedRecently", - NotConnectedRecently = "NotConnectedRecently", - Disconnected = "Disconnected", - Error = "Error" +/** Known values of {@link PrivateIPAllocationMethodEnum} that the service accepts. */ +export enum KnownPrivateIPAllocationMethodEnum { + Dynamic = "Dynamic", + Static = "Static" } /** - * Defines values for Status. \ - * {@link KnownStatus} can be used interchangeably with Status, + * Defines values for PrivateIPAllocationMethodEnum. \ + * {@link KnownPrivateIPAllocationMethodEnum} can be used interchangeably with PrivateIPAllocationMethodEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NotYetRegistered** \ - * **ConnectedRecently** \ - * **NotConnectedRecently** \ - * **Disconnected** \ - * **Error** + * **Dynamic** \ + * **Static** */ -export type Status = string; +export type PrivateIPAllocationMethodEnum = string; -/** Known values of {@link WindowsServerSubscription} that the service accepts. */ -export enum KnownWindowsServerSubscription { - Disabled = "Disabled", - Enabled = "Enabled" +/** Known values of {@link OsTypeEnum} that the service accepts. */ +export enum KnownOsTypeEnum { + Linux = "Linux", + Windows = "Windows" } /** - * Defines values for WindowsServerSubscription. \ - * {@link KnownWindowsServerSubscription} can be used interchangeably with WindowsServerSubscription, + * Defines values for OsTypeEnum. \ + * {@link KnownOsTypeEnum} can be used interchangeably with OsTypeEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Disabled** \ - * **Enabled** + * **Linux** \ + * **Windows** */ -export type WindowsServerSubscription = string; - -/** Known values of {@link DiagnosticLevel} that the service accepts. */ -export enum KnownDiagnosticLevel { - Off = "Off", - Basic = "Basic", - Enhanced = "Enhanced" +export type OsTypeEnum = string; + +/** Known values of {@link PowerStateEnum} that the service accepts. */ +export enum KnownPowerStateEnum { + Deallocated = "Deallocated", + Deallocating = "Deallocating", + Running = "Running", + Starting = "Starting", + Stopped = "Stopped", + Stopping = "Stopping", + Unknown = "Unknown" } /** - * Defines values for DiagnosticLevel. \ - * {@link KnownDiagnosticLevel} can be used interchangeably with DiagnosticLevel, + * 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 - * **Off** \ - * **Basic** \ - * **Enhanced** + * **Deallocated** \ + * **Deallocating** \ + * **Running** \ + * **Starting** \ + * **Stopped** \ + * **Stopping** \ + * **Unknown** */ -export type DiagnosticLevel = string; - -/** Known values of {@link ImdsAttestation} that the service accepts. */ -export enum KnownImdsAttestation { - Disabled = "Disabled", - Enabled = "Enabled" +export type PowerStateEnum = string; + +/** Known values of {@link VmSizeEnum} that the service accepts. */ +export enum KnownVmSizeEnum { + Default = "Default", + StandardA2V2 = "Standard_A2_v2", + StandardA4V2 = "Standard_A4_v2", + StandardD2SV3 = "Standard_D2s_v3", + StandardD4SV3 = "Standard_D4s_v3", + StandardD8SV3 = "Standard_D8s_v3", + StandardD16SV3 = "Standard_D16s_v3", + StandardD32SV3 = "Standard_D32s_v3", + StandardDS2V2 = "Standard_DS2_v2", + StandardDS3V2 = "Standard_DS3_v2", + StandardDS4V2 = "Standard_DS4_v2", + StandardDS5V2 = "Standard_DS5_v2", + StandardDS13V2 = "Standard_DS13_v2", + StandardK8SV1 = "Standard_K8S_v1", + StandardK8S2V1 = "Standard_K8S2_v1", + StandardK8S3V1 = "Standard_K8S3_v1", + StandardK8S4V1 = "Standard_K8S4_v1", + StandardNK6 = "Standard_NK6", + StandardNK12 = "Standard_NK12", + StandardNV6 = "Standard_NV6", + StandardNV12 = "Standard_NV12", + StandardK8S5V1 = "Standard_K8S5_v1", + Custom = "Custom" } /** - * Defines values for ImdsAttestation. \ - * {@link KnownImdsAttestation} can be used interchangeably with ImdsAttestation, + * 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 - * **Disabled** \ - * **Enabled** + * **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 ImdsAttestation = string; - -/** Known values of {@link ExtensionAggregateState} that the service accepts. */ -export enum KnownExtensionAggregateState { - NotSpecified = "NotSpecified", - Error = "Error", - Succeeded = "Succeeded", - Canceled = "Canceled", - Failed = "Failed", - Connected = "Connected", - Disconnected = "Disconnected", - Deleted = "Deleted", - Creating = "Creating", - Updating = "Updating", - Deleting = "Deleting", - Moving = "Moving", - PartiallySucceeded = "PartiallySucceeded", - PartiallyConnected = "PartiallyConnected", - InProgress = "InProgress" +export type VmSizeEnum = string; + +/** Known values of {@link NetworkTypeEnum} that the service accepts. */ +export enum KnownNetworkTypeEnum { + NAT = "NAT", + Transparent = "Transparent", + L2Bridge = "L2Bridge", + L2Tunnel = "L2Tunnel", + ICS = "ICS", + Private = "Private", + Overlay = "Overlay", + Internal = "Internal", + Mirrored = "Mirrored" } /** - * Defines values for ExtensionAggregateState. \ - * {@link KnownExtensionAggregateState} can be used interchangeably with ExtensionAggregateState, + * Defines values for NetworkTypeEnum. \ + * {@link KnownNetworkTypeEnum} can be used interchangeably with NetworkTypeEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** \ - * **PartiallySucceeded** \ - * **PartiallyConnected** \ - * **InProgress** + * **NAT** \ + * **Transparent** \ + * **L2Bridge** \ + * **L2Tunnel** \ + * **ICS** \ + * **Private** \ + * **Overlay** \ + * **Internal** \ + * **Mirrored** */ -export type ExtensionAggregateState = string; +export type NetworkTypeEnum = string; -/** Known values of {@link NodeExtensionState} that the service accepts. */ -export enum KnownNodeExtensionState { - NotSpecified = "NotSpecified", - Error = "Error", - Succeeded = "Succeeded", - Canceled = "Canceled", - Failed = "Failed", - Connected = "Connected", - Disconnected = "Disconnected", - Deleted = "Deleted", - Creating = "Creating", - Updating = "Updating", - Deleting = "Deleting", - Moving = "Moving" +/** Known values of {@link IpAllocationMethodEnum} that the service accepts. */ +export enum KnownIpAllocationMethodEnum { + Dynamic = "Dynamic", + Static = "Static" } /** - * Defines values for NodeExtensionState. \ - * {@link KnownNodeExtensionState} can be used interchangeably with NodeExtensionState, + * 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 - * **NotSpecified** \ - * **Error** \ - * **Succeeded** \ - * **Canceled** \ - * **Failed** \ - * **Connected** \ - * **Disconnected** \ - * **Deleted** \ - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Moving** + * **Dynamic** \ + * **Static** */ -export type NodeExtensionState = string; +export type IpAllocationMethodEnum = string; /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { @@ -788,30 +881,78 @@ export enum KnownActionType { * **Internal** */ export type ActionType = string; +/** Defines values for OperatingSystemTypes. */ +export type OperatingSystemTypes = "Windows" | "Linux"; +/** Defines values for IPPoolTypeEnum. */ +export type IPPoolTypeEnum = "vm" | "vippool"; /** Optional parameters. */ -export interface ArcSettingsListByClusterOptionalParams +export interface GalleryimagesRetrieveOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByCluster operation. */ -export type ArcSettingsListByClusterResponse = ArcSettingList; +/** Contains response data for the retrieve operation. */ +export type GalleryimagesRetrieveResponse = Galleryimages; /** Optional parameters. */ -export interface ArcSettingsGetOptionalParams +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 {} + +/** Optional parameters. */ +export interface GalleryimagesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type GalleryimagesUpdateResponse = Galleryimages; + +/** Optional parameters. */ +export interface GalleryimagesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ArcSettingsGetResponse = ArcSetting; +/** Contains response data for the listByResourceGroup operation. */ +export type GalleryimagesListByResourceGroupResponse = GalleryimagesListResult; /** Optional parameters. */ -export interface ArcSettingsCreateOptionalParams +export interface GalleryimagesListBySubscriptionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the create operation. */ -export type ArcSettingsCreateResponse = ArcSetting; +/** Contains response data for the listBySubscription operation. */ +export type GalleryimagesListBySubscriptionResponse = GalleryimagesListResult; /** Optional parameters. */ -export interface ArcSettingsDeleteOptionalParams +export interface GalleryimagesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type GalleryimagesListByResourceGroupNextResponse = GalleryimagesListResult; + +/** Optional parameters. */ +export interface GalleryimagesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type GalleryimagesListBySubscriptionNextResponse = GalleryimagesListResult; + +/** Optional parameters. */ +export interface NetworkinterfacesRetrieveOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the retrieve operation. */ +export type NetworkinterfacesRetrieveResponse = Networkinterfaces; + +/** Optional parameters. */ +export interface NetworkinterfacesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -819,82 +960,115 @@ export interface ArcSettingsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type NetworkinterfacesCreateOrUpdateResponse = Networkinterfaces; + /** Optional parameters. */ -export interface ArcSettingsListByClusterNextOptionalParams +export interface NetworkinterfacesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByClusterNext operation. */ -export type ArcSettingsListByClusterNextResponse = ArcSettingList; +/** Optional parameters. */ +export interface NetworkinterfacesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type NetworkinterfacesUpdateResponse = Networkinterfaces; + +/** Optional parameters. */ +export interface NetworkinterfacesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type NetworkinterfacesListByResourceGroupResponse = NetworkinterfacesListResult; /** Optional parameters. */ -export interface ClustersListBySubscriptionOptionalParams +export interface NetworkinterfacesListBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscription operation. */ -export type ClustersListBySubscriptionResponse = ClusterList; +export type NetworkinterfacesListBySubscriptionResponse = NetworkinterfacesListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupOptionalParams +export interface NetworkinterfacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type ClustersListByResourceGroupResponse = ClusterList; +/** Contains response data for the listByResourceGroupNext operation. */ +export type NetworkinterfacesListByResourceGroupNextResponse = NetworkinterfacesListResult; /** Optional parameters. */ -export interface ClustersGetOptionalParams +export interface NetworkinterfacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ClustersGetResponse = Cluster; +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkinterfacesListBySubscriptionNextResponse = NetworkinterfacesListResult; /** Optional parameters. */ -export interface ClustersCreateOptionalParams +export interface VirtualharddisksRetrieveOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the create operation. */ -export type ClustersCreateResponse = Cluster; +/** Contains response data for the retrieve operation. */ +export type VirtualharddisksRetrieveResponse = Virtualharddisks; + +/** Optional parameters. */ +export interface VirtualharddisksCreateOrUpdateOptionalParams + 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 VirtualharddisksCreateOrUpdateResponse = Virtualharddisks; /** Optional parameters. */ -export interface ClustersUpdateOptionalParams +export interface VirtualharddisksDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface VirtualharddisksUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the update operation. */ -export type ClustersUpdateResponse = Cluster; +export type VirtualharddisksUpdateResponse = Virtualharddisks; /** Optional parameters. */ -export interface ClustersDeleteOptionalParams +export interface VirtualharddisksListByResourceGroupOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByResourceGroup operation. */ +export type VirtualharddisksListByResourceGroupResponse = VirtualharddisksListResult; + /** Optional parameters. */ -export interface ClustersListBySubscriptionNextOptionalParams +export interface VirtualharddisksListBySubscriptionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ClustersListBySubscriptionNextResponse = ClusterList; +/** Contains response data for the listBySubscription operation. */ +export type VirtualharddisksListBySubscriptionResponse = VirtualharddisksListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupNextOptionalParams +export interface VirtualharddisksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type ClustersListByResourceGroupNextResponse = ClusterList; +export type VirtualharddisksListByResourceGroupNextResponse = VirtualharddisksListResult; /** Optional parameters. */ -export interface ExtensionsListByArcSettingOptionalParams +export interface VirtualharddisksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByArcSetting operation. */ -export type ExtensionsListByArcSettingResponse = ExtensionList; +/** Contains response data for the listBySubscriptionNext operation. */ +export type VirtualharddisksListBySubscriptionNextResponse = VirtualharddisksListResult; /** Optional parameters. */ -export interface ExtensionsGetOptionalParams +export interface VirtualmachinesRetrieveOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ExtensionsGetResponse = Extension; +/** Contains response data for the retrieve operation. */ +export type VirtualmachinesRetrieveResponse = Virtualmachines; /** Optional parameters. */ -export interface ExtensionsCreateOptionalParams +export interface VirtualmachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -902,11 +1076,22 @@ 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 VirtualmachinesCreateOrUpdateResponse = Virtualmachines; /** Optional parameters. */ -export interface ExtensionsUpdateOptionalParams +export interface VirtualmachinesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface VirtualmachinesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type VirtualmachinesUpdateResponse = Virtualmachines; + +/** Optional parameters. */ +export interface VirtualmachinesStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -914,11 +1099,61 @@ export interface ExtensionsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type ExtensionsUpdateResponse = Extension; +/** Optional parameters. */ +export interface VirtualmachinesStopOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualmachinesRestartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualmachinesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type VirtualmachinesListByResourceGroupResponse = VirtualmachinesListResult; + +/** Optional parameters. */ +export interface VirtualmachinesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type VirtualmachinesListBySubscriptionResponse = VirtualmachinesListResult; + +/** Optional parameters. */ +export interface VirtualmachinesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type VirtualmachinesListByResourceGroupNextResponse = VirtualmachinesListResult; + +/** Optional parameters. */ +export interface VirtualmachinesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type VirtualmachinesListBySubscriptionNextResponse = VirtualmachinesListResult; /** Optional parameters. */ -export interface ExtensionsDeleteOptionalParams +export interface VirtualnetworksRetrieveOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the retrieve operation. */ +export type VirtualnetworksRetrieveResponse = Virtualnetworks; + +/** Optional parameters. */ +export interface VirtualnetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -926,12 +1161,47 @@ export interface ExtensionsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type VirtualnetworksCreateOrUpdateResponse = Virtualnetworks; + +/** Optional parameters. */ +export interface VirtualnetworksDeleteOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ -export interface ExtensionsListByArcSettingNextOptionalParams +export interface VirtualnetworksUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByArcSettingNext operation. */ -export type ExtensionsListByArcSettingNextResponse = ExtensionList; +/** Contains response data for the update operation. */ +export type VirtualnetworksUpdateResponse = Virtualnetworks; + +/** Optional parameters. */ +export interface VirtualnetworksListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type VirtualnetworksListByResourceGroupResponse = VirtualnetworksListResult; + +/** Optional parameters. */ +export interface VirtualnetworksListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type VirtualnetworksListBySubscriptionResponse = VirtualnetworksListResult; + +/** Optional parameters. */ +export interface VirtualnetworksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type VirtualnetworksListByResourceGroupNextResponse = VirtualnetworksListResult; + +/** Optional parameters. */ +export interface VirtualnetworksListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type VirtualnetworksListBySubscriptionNextResponse = VirtualnetworksListResult; /** Optional parameters. */ export interface OperationsListOptionalParams diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts index c64c554c6e72..8c24c3d2248a 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts @@ -8,27 +8,19 @@ import * as coreClient from "@azure/core-client"; -export const ArcSettingList: coreClient.CompositeMapper = { +export const MOCGalleryImageStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSettingList", + className: "MOCGalleryImageStatus", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + errorCode: { + serializedName: "errorCode", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArcSetting" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } @@ -37,28 +29,19 @@ export const ArcSettingList: coreClient.CompositeMapper = { } }; -export const PerNodeState: coreClient.CompositeMapper = { +export const GalleryimagesExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PerNodeState", + className: "GalleryimagesExtendedLocation", modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - arcInstance: { - serializedName: "arcInstance", - readOnly: true, + type: { + serializedName: "type", type: { name: "String" } }, - state: { - serializedName: "state", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } @@ -92,6 +75,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 +228,26 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const ClusterList: coreClient.CompositeMapper = { +export const GalleryimagesPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryimagesPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const GalleryimagesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterList", + className: "GalleryimagesListResult", modelProperties: { value: { serializedName: "value", @@ -205,7 +256,7 @@ export const ClusterList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Cluster" + className: "Galleryimages" } } } @@ -221,82 +272,201 @@ export const ClusterList: coreClient.CompositeMapper = { } }; -export const ClusterDesiredProperties: coreClient.CompositeMapper = { +export const IpConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterDesiredProperties", + className: "IpConfiguration", modelProperties: { - windowsServerSubscription: { - serializedName: "windowsServerSubscription", + name: { + serializedName: "name", type: { name: "String" } }, - diagnosticLevel: { - serializedName: "diagnosticLevel", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "IpConfigurationProperties" } } } } }; -export const ClusterReportedProperties: coreClient.CompositeMapper = { +export const IpConfigurationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterReportedProperties", + className: "IpConfigurationProperties", modelProperties: { - clusterName: { - serializedName: "clusterName", - readOnly: true, + gateway: { + serializedName: "gateway", type: { name: "String" } }, - clusterId: { - serializedName: "clusterId", - readOnly: true, + prefixLength: { + serializedName: "prefixLength", type: { name: "String" } }, - clusterVersion: { - serializedName: "clusterVersion", - readOnly: true, + privateIPAddress: { + serializedName: "privateIPAddress", type: { name: "String" } }, - nodes: { - serializedName: "nodes", - readOnly: true, + privateIPAllocationMethod: { + serializedName: "privateIPAllocationMethod", + type: { + name: "String" + } + }, + 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" + } + } + } + } +}; + +export const InterfaceDNSSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InterfaceDNSSettings", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ClusterNode" + name: "String" } } } + } + } + } +}; + +export const MOCNetworkInterfaceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MOCNetworkInterfaceStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", + type: { + name: "String" + } }, - lastUpdated: { - serializedName: "lastUpdated", - readOnly: true, + errorMessage: { + serializedName: "errorMessage", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const NetworkinterfacesExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkinterfacesExtendedLocation", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" } }, - imdsAttestation: { - serializedName: "imdsAttestation", - readOnly: true, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkinterfacesPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkinterfacesPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const NetworkinterfacesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkinterfacesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Networkinterfaces" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const MOCVirtualHardDiskStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MOCVirtualHardDiskStatus", + modelProperties: { + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - diagnosticLevel: { - serializedName: "diagnosticLevel", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } @@ -305,177 +475,949 @@ export const ClusterReportedProperties: coreClient.CompositeMapper = { } }; -export const ClusterNode: coreClient.CompositeMapper = { +export const VirtualharddisksExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterNode", + className: "VirtualharddisksExtendedLocation", modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, name: { serializedName: "name", - readOnly: true, type: { name: "String" } - }, - id: { - serializedName: "id", - readOnly: true, + } + } + } +}; + +export const VirtualharddisksPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualharddisksPatch", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const VirtualharddisksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualharddisksListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Virtualharddisks" + } + } } }, - windowsServerSubscription: { - serializedName: "windowsServerSubscription", - readOnly: true, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPropertiesHardwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesHardwareProfile", + modelProperties: { + vmSize: { + serializedName: "vmSize", type: { name: "String" } }, - manufacturer: { - serializedName: "manufacturer", - readOnly: true, + processors: { + serializedName: "processors", + type: { + name: "Number" + } + }, + memoryGB: { + serializedName: "memoryGB", + type: { + name: "Number" + } + }, + dynamicMemoryConfig: { + serializedName: "dynamicMemoryConfig", + type: { + name: "Composite", + className: + "VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig" + } + } + } + } +}; + +export const VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesHardwareProfileDynamicMemoryConfig", + modelProperties: { + maximumMemoryGB: { + serializedName: "maximumMemoryGB", + type: { + name: "Number" + } + }, + minimumMemoryGB: { + serializedName: "minimumMemoryGB", + type: { + name: "Number" + } + }, + targetMemoryBuffer: { + serializedName: "targetMemoryBuffer", + type: { + name: "Number" + } + } + } + } +}; + +export const VirtualmachinesPropertiesNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesNetworkProfile", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem" + } + } + } + } + } + } +}; + +export const VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfile", + modelProperties: { + adminPassword: { + serializedName: "adminPassword", + type: { + name: "String" + } + }, + adminUsername: { + serializedName: "adminUsername", + type: { + name: "String" + } + }, + computerName: { + serializedName: "computerName", + type: { + name: "String" + } + }, + linuxConfiguration: { + serializedName: "linuxConfiguration", + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileLinuxConfiguration" + } + }, + osType: { + serializedName: "osType", + type: { + name: "String" + } + }, + windowsConfiguration: { + serializedName: "windowsConfiguration", + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileWindowsConfiguration" + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfileLinuxConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileLinuxConfiguration", + modelProperties: { + disablePasswordAuthentication: { + serializedName: "disablePasswordAuthentication", + type: { + name: "Boolean" + } + }, + ssh: { + serializedName: "ssh", + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh" + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileLinuxConfigurationSsh", + modelProperties: { + publicKeys: { + serializedName: "publicKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem" + } + } + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "VirtualmachinesPropertiesOsProfileLinuxConfigurationSshPublicKeysItem", + modelProperties: { + keyData: { + serializedName: "keyData", + type: { + name: "String" + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfileWindowsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileWindowsConfiguration", + modelProperties: { + enableAutomaticUpdates: { + serializedName: "enableAutomaticUpdates", + type: { + name: "Boolean" + } + }, + ssh: { + serializedName: "ssh", + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh" + } + }, + timeZone: { + serializedName: "timeZone", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesOsProfileWindowsConfigurationSsh", + modelProperties: { + publicKeys: { + serializedName: "publicKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem" + } + } + } + } + } + } +}; + +export const VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "VirtualmachinesPropertiesOsProfileWindowsConfigurationSshPublicKeysItem", + modelProperties: { + keyData: { + serializedName: "keyData", + type: { + name: "String" + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPropertiesSecurityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesSecurityProfile", + modelProperties: { + enableTPM: { + serializedName: "enableTPM", + type: { + name: "Boolean" + } + } + } + } +}; + +export const VirtualmachinesPropertiesStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesStorageProfile", + modelProperties: { + dataDisks: { + serializedName: "dataDisks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesStorageProfileDataDisksItem" + } + } + } + }, + imageReference: { + serializedName: "imageReference", + type: { + name: "Composite", + className: "VirtualmachinesPropertiesStorageProfileImageReference" + } + } + } + } +}; + +export const VirtualmachinesPropertiesStorageProfileDataDisksItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesStorageProfileDataDisksItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPropertiesStorageProfileImageReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPropertiesStorageProfileImageReference", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const MOCVirtualMachineStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MOCVirtualMachineStatus", + modelProperties: { + powerState: { + serializedName: "powerState", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "errorCode", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesExtendedLocation", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualmachinesPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesPatch", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "VirtualMachineUpdateProperties" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const VirtualMachineUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineUpdateProperties", + 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" + } + } + } + } +}; + +export const HardwareProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HardwareProfileUpdate", + modelProperties: { + vmSize: { + serializedName: "vmSize", + type: { + name: "String" + } + }, + processors: { + serializedName: "processors", + type: { + name: "Number" + } + }, + memoryGB: { + serializedName: "memoryGB", + 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: { + name: { + serializedName: "name", + 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 VirtualmachinesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualmachinesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Virtualmachines" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualnetworksPropertiesSubnetsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualnetworksPropertiesSubnetsItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + addressPrefix: { + serializedName: "properties.addressPrefix", + type: { + name: "String" + } + }, + addressPrefixes: { + serializedName: "properties.addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipAllocationMethod: { + serializedName: "properties.ipAllocationMethod", + type: { + name: "String" + } + }, + ipConfigurationReferences: { + serializedName: "properties.ipConfigurationReferences", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems" + } + } + } + }, + routeTable: { + serializedName: "properties.routeTable", + type: { + name: "Composite", + className: + "ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable" + } + }, + ipPools: { + serializedName: "properties.ipPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPPool" + } + } + } + }, + vlan: { + serializedName: "properties.vlan", + type: { + name: "Number" + } + } + } + } +}; + +export const ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems", + modelProperties: { + id: { + serializedName: "ID", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + routes: { + serializedName: "properties.routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualnetworksPropertiesSubnetsPropertiesItemsItem" + } + } + } + } + } + } +}; + +export const VirtualnetworksPropertiesSubnetsPropertiesItemsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualnetworksPropertiesSubnetsPropertiesItemsItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + addressPrefix: { + serializedName: "properties.addressPrefix", + type: { + name: "String" + } + }, + nextHopIpAddress: { + serializedName: "properties.nextHopIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const IPPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPPool", + modelProperties: { + ipPoolType: { + serializedName: "ipPoolType", type: { - name: "String" + name: "Enum", + allowedValues: ["vm", "vippool"] } }, - model: { - serializedName: "model", - readOnly: true, + start: { + serializedName: "start", type: { name: "String" } }, - osName: { - serializedName: "osName", - readOnly: true, + end: { + serializedName: "end", type: { name: "String" } }, - osVersion: { - serializedName: "osVersion", - readOnly: true, + info: { + serializedName: "info", type: { - name: "String" + name: "Composite", + className: "IPPoolInfo" } - }, - serialNumber: { - serializedName: "serialNumber", + } + } + } +}; + +export const IPPoolInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPPoolInfo", + modelProperties: { + used: { + serializedName: "used", readOnly: true, type: { name: "String" } }, - coreCount: { - serializedName: "coreCount", - readOnly: true, - type: { - name: "Number" - } - }, - memoryInGiB: { - serializedName: "memoryInGiB", + available: { + serializedName: "available", readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const ClusterPatch: coreClient.CompositeMapper = { +export const MOCVirtualNetworkStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterPatch", + className: "MOCVirtualNetworkStatus", modelProperties: { - tags: { - serializedName: "tags", + errorCode: { + serializedName: "errorCode", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - cloudManagementEndpoint: { - serializedName: "properties.cloudManagementEndpoint", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } - }, - aadClientId: { - serializedName: "properties.aadClientId", + } + } + } +}; + +export const VirtualnetworksExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualnetworksExtendedLocation", + modelProperties: { + type: { + serializedName: "type", type: { name: "String" } }, - aadTenantId: { - serializedName: "properties.aadTenantId", + name: { + serializedName: "name", type: { name: "String" } - }, - desiredProperties: { - serializedName: "properties.desiredProperties", + } + } + } +}; + +export const VirtualnetworksPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualnetworksPatch", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "ClusterDesiredProperties" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const ExtensionList: coreClient.CompositeMapper = { +export const VirtualnetworksListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtensionList", + className: "VirtualnetworksListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Extension" + className: "Virtualnetworks" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PerNodeExtensionState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PerNodeExtensionState", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - extension: { - serializedName: "extension", - readOnly: true, - type: { - name: "String" - } - }, - state: { - serializedName: "state", - readOnly: true, type: { name: "String" } @@ -594,16 +1536,6 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -628,331 +1560,307 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ArcSetting: coreClient.CompositeMapper = { +export const Galleryimages: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSetting", + className: "Galleryimages", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - arcInstanceResourceGroup: { - serializedName: "properties.arcInstanceResourceGroup", - type: { - name: "String" - } - }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, - type: { - name: "String" - } - }, - perNodeDetails: { - serializedName: "properties.perNodeDetails", - readOnly: true, + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PerNodeState" - } - } + name: "Composite", + className: "GalleryimagesExtendedLocation" } }, - createdBy: { - serializedName: "systemData.createdBy", + containerName: { + serializedName: "properties.containerName", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + imagePath: { + serializedName: "properties.imagePath", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + osType: { + serializedName: "properties.osType", type: { - name: "DateTime" + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + resourceName: { + serializedName: "properties.resourceName", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + status: { + serializedName: "properties.status", type: { - name: "DateTime" + name: "Composite", + className: "MOCGalleryImageStatus" } } } } }; -export const Extension: coreClient.CompositeMapper = { +export const Networkinterfaces: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Extension", + className: "Networkinterfaces", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "String" + name: "Composite", + className: "NetworkinterfacesExtendedLocation" } }, - perNodeExtensionDetails: { - serializedName: "properties.perNodeExtensionDetails", - readOnly: true, + ipConfigurations: { + serializedName: "properties.ipConfigurations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeExtensionState" + className: "IpConfiguration" } } } }, - forceUpdateTag: { - serializedName: "properties.extensionParameters.forceUpdateTag", + macAddress: { + serializedName: "properties.macAddress", type: { name: "String" } }, - publisher: { - serializedName: "properties.extensionParameters.publisher", + dnsSettings: { + serializedName: "properties.dnsSettings", type: { - name: "String" + name: "Composite", + className: "InterfaceDNSSettings" } }, - typePropertiesExtensionParametersType: { - serializedName: "properties.extensionParameters.type", + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.extensionParameters.typeHandlerVersion", + resourceName: { + serializedName: "properties.resourceName", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: - "properties.extensionParameters.autoUpgradeMinorVersion", + status: { + serializedName: "properties.status", type: { - name: "Boolean" + name: "Composite", + className: "MOCNetworkInterfaceStatus" + } + } + } + } +}; + +export const Virtualharddisks: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Virtualharddisks", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "VirtualharddisksExtendedLocation" } }, - settings: { - serializedName: "properties.extensionParameters.settings", + blockSizeBytes: { + serializedName: "properties.blockSizeBytes", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } }, - protectedSettings: { - serializedName: "properties.extensionParameters.protectedSettings", + diskSizeBytes: { + serializedName: "properties.diskSizeBytes", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } }, - createdBy: { - serializedName: "systemData.createdBy", + dynamic: { + serializedName: "properties.dynamic", type: { - name: "String" + name: "Boolean" } }, - createdByType: { - serializedName: "systemData.createdByType", + logicalSectorBytes: { + serializedName: "properties.logicalSectorBytes", type: { - name: "String" + name: "Number" } }, - createdAt: { - serializedName: "systemData.createdAt", + physicalSectorBytes: { + serializedName: "properties.physicalSectorBytes", type: { - name: "DateTime" + name: "Number" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + resourceName: { + serializedName: "properties.resourceName", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + status: { + serializedName: "properties.status", type: { - name: "DateTime" + name: "Composite", + className: "MOCVirtualHardDiskStatus" } } } } }; -export const Cluster: coreClient.CompositeMapper = { +export const Virtualmachines: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cluster", + className: "Virtualmachines", modelProperties: { ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - readOnly: true, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "String" + name: "Composite", + className: "VirtualmachinesExtendedLocation" } }, - cloudId: { - serializedName: "properties.cloudId", - readOnly: true, + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { - name: "String" + name: "Composite", + className: "VirtualmachinesPropertiesHardwareProfile" } }, - cloudManagementEndpoint: { - serializedName: "properties.cloudManagementEndpoint", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "String" + name: "Composite", + className: "VirtualmachinesPropertiesNetworkProfile" } }, - aadClientId: { - serializedName: "properties.aadClientId", + osProfile: { + serializedName: "properties.osProfile", type: { - name: "String" + name: "Composite", + className: "VirtualmachinesPropertiesOsProfile" } }, - aadTenantId: { - serializedName: "properties.aadTenantId", + resourceName: { + serializedName: "properties.resourceName", type: { name: "String" } }, - desiredProperties: { - serializedName: "properties.desiredProperties", + securityProfile: { + serializedName: "properties.securityProfile", type: { name: "Composite", - className: "ClusterDesiredProperties" + className: "VirtualmachinesPropertiesSecurityProfile" } }, - reportedProperties: { - serializedName: "properties.reportedProperties", + storageProfile: { + serializedName: "properties.storageProfile", type: { name: "Composite", - className: "ClusterReportedProperties" - } - }, - trialDaysRemaining: { - serializedName: "properties.trialDaysRemaining", - readOnly: true, - type: { - name: "Number" + className: "VirtualmachinesPropertiesStorageProfile" } }, - billingModel: { - serializedName: "properties.billingModel", - readOnly: true, + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } }, - registrationTimestamp: { - serializedName: "properties.registrationTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - lastSyncTimestamp: { - serializedName: "properties.lastSyncTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - lastBillingTimestamp: { - serializedName: "properties.lastBillingTimestamp", - readOnly: true, + status: { + serializedName: "properties.status", type: { - name: "DateTime" + name: "Composite", + className: "MOCVirtualMachineStatus" } - }, - createdBy: { - serializedName: "systemData.createdBy", + } + } + } +}; + +export const Virtualnetworks: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Virtualnetworks", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "String" + name: "Composite", + className: "VirtualnetworksExtendedLocation" } }, - createdByType: { - serializedName: "systemData.createdByType", + networkType: { + serializedName: "properties.networkType", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + subnets: { + serializedName: "properties.subnets", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualnetworksPropertiesSubnetsItem" + } + } } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + resourceName: { + serializedName: "properties.resourceName", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + status: { + serializedName: "properties.status", type: { - name: "DateTime" + name: "Composite", + className: "MOCVirtualNetworkStatus" } } } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts index 60a1521159de..2aa01d3f3b0a 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts @@ -12,10 +12,16 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - ArcSetting as ArcSettingMapper, - Cluster as ClusterMapper, - ClusterPatch as ClusterPatchMapper, - Extension as ExtensionMapper + Galleryimages as GalleryimagesMapper, + GalleryimagesPatch as GalleryimagesPatchMapper, + Networkinterfaces as NetworkinterfacesMapper, + NetworkinterfacesPatch as NetworkinterfacesPatchMapper, + Virtualharddisks as VirtualharddisksMapper, + VirtualharddisksPatch as VirtualharddisksPatchMapper, + Virtualmachines as VirtualmachinesMapper, + VirtualmachinesPatch as VirtualmachinesPatchMapper, + Virtualnetworks as VirtualnetworksMapper, + VirtualnetworksPatch as VirtualnetworksPatchMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -71,10 +77,14 @@ export const resourceGroupName: OperationURLParameter = { } }; -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", +export const galleryimagesName: OperationURLParameter = { + parameterPath: "galleryimagesName", mapper: { - serializedName: "clusterName", + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "galleryimagesName", required: true, type: { name: "String" @@ -85,7 +95,7 @@ export const clusterName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-01-01", + defaultValue: "2021-07-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -94,17 +104,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: { @@ -117,9 +116,14 @@ export const contentType: OperationParameter = { } }; -export const arcSetting: OperationParameter = { - parameterPath: "arcSetting", - mapper: ArcSettingMapper +export const galleryimages: OperationParameter = { + parameterPath: "galleryimages", + mapper: GalleryimagesMapper +}; + +export const galleryimages1: OperationParameter = { + parameterPath: "galleryimages", + mapper: GalleryimagesPatchMapper }; export const nextLink: OperationURLParameter = { @@ -134,20 +138,64 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const cluster: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterMapper +export const networkinterfacesName: OperationURLParameter = { + parameterPath: "networkinterfacesName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "networkinterfacesName", + required: true, + type: { + name: "String" + } + } +}; + +export const networkinterfaces: OperationParameter = { + parameterPath: "networkinterfaces", + mapper: NetworkinterfacesMapper +}; + +export const networkinterfaces1: OperationParameter = { + parameterPath: "networkinterfaces", + mapper: NetworkinterfacesPatchMapper +}; + +export const virtualharddisksName: OperationURLParameter = { + parameterPath: "virtualharddisksName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "virtualharddisksName", + required: true, + type: { + name: "String" + } + } +}; + +export const virtualharddisks: OperationParameter = { + parameterPath: "virtualharddisks", + mapper: VirtualharddisksMapper }; -export const cluster1: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterPatchMapper +export const virtualharddisks1: OperationParameter = { + parameterPath: "virtualharddisks", + mapper: VirtualharddisksPatchMapper }; -export const extensionName: OperationURLParameter = { - parameterPath: "extensionName", +export const virtualmachinesName: OperationURLParameter = { + parameterPath: "virtualmachinesName", mapper: { - serializedName: "extensionName", + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "virtualmachinesName", required: true, type: { name: "String" @@ -155,7 +203,37 @@ export const extensionName: OperationURLParameter = { } }; -export const extension: OperationParameter = { - parameterPath: "extension", - mapper: ExtensionMapper +export const virtualmachines: OperationParameter = { + parameterPath: "virtualmachines", + mapper: VirtualmachinesMapper +}; + +export const virtualmachines1: OperationParameter = { + parameterPath: "virtualmachines", + mapper: VirtualmachinesPatchMapper +}; + +export const virtualnetworksName: OperationURLParameter = { + parameterPath: "virtualnetworksName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "virtualnetworksName", + required: true, + type: { + name: "String" + } + } +}; + +export const virtualnetworks: OperationParameter = { + parameterPath: "virtualnetworks", + mapper: VirtualnetworksMapper +}; + +export const virtualnetworks1: OperationParameter = { + parameterPath: "virtualnetworks", + mapper: VirtualnetworksPatchMapper }; 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 90c049668791..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts +++ /dev/null @@ -1,394 +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 { 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, - ArcSettingsDeleteOptionalParams, - 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: () => { - return this.listByClusterPagingPage( - resourceGroupName, - clusterName, - options - ); - } - }; - } - - private async *listByClusterPagingPage( - resourceGroupName: string, - clusterName: string, - options?: ArcSettingsListByClusterOptionalParams - ): AsyncIterableIterator { - let result = await this._listByCluster( - resourceGroupName, - clusterName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByClusterNext( - resourceGroupName, - clusterName, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - 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 - ); - } - - /** - * 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 - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - } - - /** - * 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(); - } - - /** - * 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 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 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 cec0ec77d279..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts +++ /dev/null @@ -1,672 +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 { 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: () => { - return this.listByArcSettingPagingPage( - resourceGroupName, - clusterName, - arcSettingName, - options - ); - } - }; - } - - private async *listByArcSettingPagingPage( - resourceGroupName: string, - clusterName: string, - arcSettingName: string, - options?: ExtensionsListByArcSettingOptionalParams - ): AsyncIterableIterator { - let result = await this._listByArcSetting( - resourceGroupName, - clusterName, - arcSettingName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByArcSettingNext( - resourceGroupName, - clusterName, - arcSettingName, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - 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 - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - } - - /** - * 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 - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "original-uri" - }); - } - - /** - * 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 - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - } - - /** - * 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..06e7dd26586f --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/galleryimagesOperations.ts @@ -0,0 +1,530 @@ +/* + * 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 { GalleryimagesOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Galleryimages, + GalleryimagesListByResourceGroupNextOptionalParams, + GalleryimagesListByResourceGroupOptionalParams, + GalleryimagesListBySubscriptionNextOptionalParams, + GalleryimagesListBySubscriptionOptionalParams, + GalleryimagesRetrieveOptionalParams, + GalleryimagesRetrieveResponse, + GalleryimagesCreateOrUpdateOptionalParams, + GalleryimagesCreateOrUpdateResponse, + GalleryimagesDeleteOptionalParams, + GalleryimagesPatch, + GalleryimagesUpdateOptionalParams, + GalleryimagesUpdateResponse, + GalleryimagesListByResourceGroupResponse, + GalleryimagesListBySubscriptionResponse, + GalleryimagesListByResourceGroupNextResponse, + GalleryimagesListBySubscriptionNextResponse +} 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 galleryimages under the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: GalleryimagesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: GalleryimagesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: GalleryimagesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List all galleryimages under the subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: GalleryimagesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: GalleryimagesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: GalleryimagesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all galleryimages under the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + galleryimagesName: string, + options?: GalleryimagesRetrieveOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryimagesName, options }, + retrieveOperationSpec + ); + } + + /** + * Create or update a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param galleryimages The galleryimages resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + galleryimagesName: string, + galleryimages: Galleryimages, + options?: GalleryimagesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryimagesCreateOrUpdateResponse + > + > { + 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, galleryimagesName, galleryimages, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Create or update a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param galleryimages The galleryimages resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryimagesName: string, + galleryimages: Galleryimages, + options?: GalleryimagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + galleryimagesName, + galleryimages, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + galleryimagesName: string, + options?: GalleryimagesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryimagesName, options }, + deleteOperationSpec + ); + } + + /** + * Update a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param galleryimages The galleryimages resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + galleryimagesName: string, + galleryimages: GalleryimagesPatch, + options?: GalleryimagesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryimagesName, galleryimages, options }, + updateOperationSpec + ); + } + + /** + * Lists all galleryimages under the 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?: GalleryimagesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List all galleryimages under the subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: GalleryimagesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @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 options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: GalleryimagesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: GalleryimagesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const retrieveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryimages/{galleryimagesName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Galleryimages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryimagesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryimages/{galleryimagesName}", + 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.galleryimagesName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryimages/{galleryimagesName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryimagesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryimages/{galleryimagesName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Galleryimages + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.galleryimages1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.galleryimagesName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: 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 listBySubscriptionOperationSpec: 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 listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryimagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryimagesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + 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..3944aa3c0c4c 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts @@ -6,7 +6,9 @@ * 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 "./networkinterfacesOperations"; +export * from "./virtualharddisksOperations"; +export * from "./virtualmachinesOperations"; +export * from "./virtualnetworksOperations"; export * from "./operations"; 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..d04a8848fe97 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/networkinterfacesOperations.ts @@ -0,0 +1,518 @@ +/* + * 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 { 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Networkinterfaces, + NetworkinterfacesListByResourceGroupNextOptionalParams, + NetworkinterfacesListByResourceGroupOptionalParams, + NetworkinterfacesListBySubscriptionNextOptionalParams, + NetworkinterfacesListBySubscriptionOptionalParams, + NetworkinterfacesRetrieveOptionalParams, + NetworkinterfacesRetrieveResponse, + NetworkinterfacesCreateOrUpdateOptionalParams, + NetworkinterfacesCreateOrUpdateResponse, + NetworkinterfacesDeleteOptionalParams, + NetworkinterfacesPatch, + NetworkinterfacesUpdateOptionalParams, + NetworkinterfacesUpdateResponse, + NetworkinterfacesListByResourceGroupResponse, + NetworkinterfacesListBySubscriptionResponse, + NetworkinterfacesListByResourceGroupNextResponse, + NetworkinterfacesListBySubscriptionNextResponse +} 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; + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: NetworkinterfacesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: NetworkinterfacesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: NetworkinterfacesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** @param options The options parameters. */ + public listBySubscription( + options?: NetworkinterfacesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkinterfacesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkinterfacesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + networkinterfacesName: string, + options?: NetworkinterfacesRetrieveOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkinterfacesName, options }, + retrieveOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param networkinterfaces The networkinterfaces resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + networkinterfacesName: string, + networkinterfaces: Networkinterfaces, + options?: NetworkinterfacesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + NetworkinterfacesCreateOrUpdateResponse + > + > { + 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, networkinterfacesName, networkinterfaces, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param networkinterfaces The networkinterfaces resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + networkinterfacesName: string, + networkinterfaces: Networkinterfaces, + options?: NetworkinterfacesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + networkinterfacesName, + networkinterfaces, + options + ); + return poller.pollUntilDone(); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + networkinterfacesName: string, + options?: NetworkinterfacesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkinterfacesName, options }, + deleteOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param networkinterfaces The networkinterfaces resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + networkinterfacesName: string, + networkinterfaces: NetworkinterfacesPatch, + options?: NetworkinterfacesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkinterfacesName, networkinterfaces, options }, + updateOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: NetworkinterfacesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** @param options The options parameters. */ + private _listBySubscription( + options?: NetworkinterfacesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @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 options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: NetworkinterfacesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkinterfacesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const retrieveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkinterfaces/{networkinterfacesName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Networkinterfaces + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkinterfacesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkinterfaces/{networkinterfacesName}", + 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.networkinterfacesName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkinterfaces/{networkinterfacesName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkinterfacesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkinterfaces/{networkinterfacesName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Networkinterfaces + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.networkinterfaces1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkinterfacesName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: 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 listBySubscriptionOperationSpec: 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 listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkinterfacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkinterfacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualharddisksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualharddisksOperations.ts new file mode 100644 index 000000000000..241b21611ce3 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualharddisksOperations.ts @@ -0,0 +1,518 @@ +/* + * 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 { 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 { + Virtualharddisks, + VirtualharddisksListByResourceGroupNextOptionalParams, + VirtualharddisksListByResourceGroupOptionalParams, + VirtualharddisksListBySubscriptionNextOptionalParams, + VirtualharddisksListBySubscriptionOptionalParams, + VirtualharddisksRetrieveOptionalParams, + VirtualharddisksRetrieveResponse, + VirtualharddisksCreateOrUpdateOptionalParams, + VirtualharddisksCreateOrUpdateResponse, + VirtualharddisksDeleteOptionalParams, + VirtualharddisksPatch, + VirtualharddisksUpdateOptionalParams, + VirtualharddisksUpdateResponse, + VirtualharddisksListByResourceGroupResponse, + VirtualharddisksListBySubscriptionResponse, + VirtualharddisksListByResourceGroupNextResponse, + VirtualharddisksListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing VirtualharddisksOperations operations. */ +export class VirtualharddisksOperationsImpl + implements VirtualharddisksOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class VirtualharddisksOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: VirtualharddisksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: VirtualharddisksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: VirtualharddisksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** @param options The options parameters. */ + public listBySubscription( + options?: VirtualharddisksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: VirtualharddisksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: VirtualharddisksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + virtualharddisksName: string, + options?: VirtualharddisksRetrieveOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualharddisksName, options }, + retrieveOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param virtualharddisks The virtualharddisks resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + virtualharddisksName: string, + virtualharddisks: Virtualharddisks, + options?: VirtualharddisksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualharddisksCreateOrUpdateResponse + > + > { + 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, virtualharddisksName, virtualharddisks, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param virtualharddisks The virtualharddisks resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualharddisksName: string, + virtualharddisks: Virtualharddisks, + options?: VirtualharddisksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + virtualharddisksName, + virtualharddisks, + options + ); + return poller.pollUntilDone(); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + virtualharddisksName: string, + options?: VirtualharddisksDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualharddisksName, options }, + deleteOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param virtualharddisks The virtualharddisks resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + virtualharddisksName: string, + virtualharddisks: VirtualharddisksPatch, + options?: VirtualharddisksUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualharddisksName, virtualharddisks, options }, + updateOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: VirtualharddisksListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** @param options The options parameters. */ + private _listBySubscription( + options?: VirtualharddisksListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @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 options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: VirtualharddisksListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: VirtualharddisksListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const retrieveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualharddisks/{virtualharddisksName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Virtualharddisks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualharddisksName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualharddisks/{virtualharddisksName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Virtualharddisks + }, + 201: { + bodyMapper: Mappers.Virtualharddisks + }, + 202: { + bodyMapper: Mappers.Virtualharddisks + }, + 204: { + bodyMapper: Mappers.Virtualharddisks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualharddisks, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualharddisksName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualharddisks/{virtualharddisksName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualharddisksName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualharddisks/{virtualharddisksName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Virtualharddisks + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualharddisks1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualharddisksName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualharddisks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualharddisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualharddisks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualharddisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualharddisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualharddisksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualmachinesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualmachinesOperations.ts new file mode 100644 index 000000000000..ab7482a34cb1 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualmachinesOperations.ts @@ -0,0 +1,827 @@ +/* + * 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 { VirtualmachinesOperations } 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 { + Virtualmachines, + VirtualmachinesListByResourceGroupNextOptionalParams, + VirtualmachinesListByResourceGroupOptionalParams, + VirtualmachinesListBySubscriptionNextOptionalParams, + VirtualmachinesListBySubscriptionOptionalParams, + VirtualmachinesRetrieveOptionalParams, + VirtualmachinesRetrieveResponse, + VirtualmachinesCreateOrUpdateOptionalParams, + VirtualmachinesCreateOrUpdateResponse, + VirtualmachinesDeleteOptionalParams, + VirtualmachinesPatch, + VirtualmachinesUpdateOptionalParams, + VirtualmachinesUpdateResponse, + VirtualmachinesStartOptionalParams, + VirtualmachinesStopOptionalParams, + VirtualmachinesRestartOptionalParams, + VirtualmachinesListByResourceGroupResponse, + VirtualmachinesListBySubscriptionResponse, + VirtualmachinesListByResourceGroupNextResponse, + VirtualmachinesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing VirtualmachinesOperations operations. */ +export class VirtualmachinesOperationsImpl + implements VirtualmachinesOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class VirtualmachinesOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: VirtualmachinesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: VirtualmachinesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: VirtualmachinesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** @param options The options parameters. */ + public listBySubscription( + options?: VirtualmachinesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: VirtualmachinesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: VirtualmachinesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesRetrieveOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualmachinesName, options }, + retrieveOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param virtualmachines The virtualmachines resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + virtualmachinesName: string, + virtualmachines: Virtualmachines, + options?: VirtualmachinesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualmachinesCreateOrUpdateResponse + > + > { + 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, virtualmachinesName, virtualmachines, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param virtualmachines The virtualmachines resource definition. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualmachinesName: string, + virtualmachines: Virtualmachines, + options?: VirtualmachinesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + virtualmachinesName, + virtualmachines, + options + ); + return poller.pollUntilDone(); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualmachinesName, options }, + deleteOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param virtualmachines The virtualmachines resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + virtualmachinesName: string, + virtualmachines: VirtualmachinesPatch, + options?: VirtualmachinesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualmachinesName, virtualmachines, options }, + updateOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + async beginStart( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStartOptionalParams + ): 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, virtualmachinesName, options }, + startOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + async beginStartAndWait( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + virtualmachinesName, + options + ); + return poller.pollUntilDone(); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + async beginStop( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStopOptionalParams + ): 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, virtualmachinesName, options }, + stopOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + async beginStopAndWait( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStopOptionalParams + ): Promise { + const poller = await this.beginStop( + resourceGroupName, + virtualmachinesName, + options + ); + return poller.pollUntilDone(); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + async beginRestart( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesRestartOptionalParams + ): 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, virtualmachinesName, options }, + restartOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( + resourceGroupName, + virtualmachinesName, + options + ); + return poller.pollUntilDone(); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: VirtualmachinesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** @param options The options parameters. */ + private _listBySubscription( + options?: VirtualmachinesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @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 options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: VirtualmachinesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: VirtualmachinesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const retrieveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Virtualmachines + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Virtualmachines + }, + 201: { + bodyMapper: Mappers.Virtualmachines + }, + 202: { + bodyMapper: Mappers.Virtualmachines + }, + 204: { + bodyMapper: Mappers.Virtualmachines + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualmachines, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Virtualmachines + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.virtualmachines1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}/start", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}/stop", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines/{virtualmachinesName}/restart", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualmachinesName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualmachines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualmachinesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualmachines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualmachinesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualmachinesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualmachinesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + 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/virtualnetworksOperations.ts similarity index 55% rename from sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts rename to sdk/azurestackhci/arm-azurestackhci/src/operations/virtualnetworksOperations.ts index 382b1bffb34a..8abde1f49250 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/virtualnetworksOperations.ts @@ -7,38 +7,41 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Clusters } from "../operationsInterfaces"; +import { VirtualnetworksOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; import { - Cluster, - ClustersListBySubscriptionNextOptionalParams, - ClustersListBySubscriptionOptionalParams, - ClustersListByResourceGroupNextOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersListBySubscriptionResponse, - ClustersListByResourceGroupResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOptionalParams, - ClustersCreateResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - ClustersListBySubscriptionNextResponse, - ClustersListByResourceGroupNextResponse + Virtualnetworks, + VirtualnetworksListByResourceGroupNextOptionalParams, + VirtualnetworksListByResourceGroupOptionalParams, + VirtualnetworksListBySubscriptionNextOptionalParams, + VirtualnetworksListBySubscriptionOptionalParams, + VirtualnetworksRetrieveOptionalParams, + VirtualnetworksRetrieveResponse, + VirtualnetworksCreateOrUpdateOptionalParams, + VirtualnetworksCreateOrUpdateResponse, + VirtualnetworksDeleteOptionalParams, + VirtualnetworksPatch, + VirtualnetworksUpdateOptionalParams, + VirtualnetworksUpdateResponse, + VirtualnetworksListByResourceGroupResponse, + VirtualnetworksListBySubscriptionResponse, + VirtualnetworksListByResourceGroupNextResponse, + VirtualnetworksListBySubscriptionNextResponse } from "../models"; /// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { +/** Class containing VirtualnetworksOperations operations. */ +export class VirtualnetworksOperationsImpl + implements VirtualnetworksOperations { private readonly client: AzureStackHCIClient; /** - * Initialize a new instance of the class Clusters class. + * Initialize a new instance of the class VirtualnetworksOperations class. * @param client Reference to the service client */ constructor(client: AzureStackHCIClient) { @@ -46,13 +49,14 @@ export class ClustersImpl implements Clusters { } /** - * List all HCI clusters in a subscription. + * @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 listByResourceGroup( + resourceGroupName: string, + options?: VirtualnetworksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { next() { return iter.next(); @@ -61,42 +65,46 @@ export class ClustersImpl implements Clusters { return this; }, byPage: () => { - return this.listBySubscriptionPagingPage(options); + return this.listByResourceGroupPagingPage(resourceGroupName, options); } }; } - private async *listBySubscriptionPagingPage( - options?: ClustersListBySubscriptionOptionalParams - ): AsyncIterableIterator { - let result = await this._listBySubscription(options); + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: VirtualnetworksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); continuationToken = result.nextLink; yield result.value || []; } } - private async *listBySubscriptionPagingAll( - options?: ClustersListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: VirtualnetworksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + 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. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + /** @param options The options parameters. */ + public listBySubscription( + options?: VirtualnetworksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); return { next() { return iter.next(); @@ -105,153 +113,192 @@ export class ClustersImpl implements Clusters { return this; }, byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + return this.listBySubscriptionPagingPage(options); } }; } - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); + private async *listBySubscriptionPagingPage( + options?: VirtualnetworksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); + result = await this._listBySubscriptionNext(continuationToken, options); continuationToken = result.nextLink; yield result.value || []; } } - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { + private async *listBySubscriptionPagingAll( + options?: VirtualnetworksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; } } /** - * List all HCI clusters in a subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName * @param options The options parameters. */ - private _listBySubscription( - options?: ClustersListBySubscriptionOptionalParams - ): Promise { + retrieve( + resourceGroupName: string, + virtualnetworksName: string, + options?: VirtualnetworksRetrieveOptionalParams + ): Promise { return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec + { resourceGroupName, virtualnetworksName, options }, + retrieveOperationSpec ); } /** - * List all HCI clusters in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName + * @param virtualnetworks The virtualnetworks resource definition. * @param options The options parameters. */ - private _listByResourceGroup( + async beginCreateOrUpdate( resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec + virtualnetworksName: string, + virtualnetworks: Virtualnetworks, + options?: VirtualnetworksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualnetworksCreateOrUpdateResponse + > + > { + 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, virtualnetworksName, virtualnetworks, options }, + createOrUpdateOperationSpec ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); } /** - * Get HCI cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param virtualnetworksName + * @param virtualnetworks The virtualnetworks resource definition. * @param options The options parameters. */ - get( + async beginCreateOrUpdateAndWait( resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - getOperationSpec + virtualnetworksName: string, + virtualnetworks: Virtualnetworks, + options?: VirtualnetworksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + virtualnetworksName, + virtualnetworks, + options ); + return poller.pollUntilDone(); } /** - * 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 virtualnetworksName * @param options The options parameters. */ - create( + delete( resourceGroupName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOptionalParams - ): Promise { + virtualnetworksName: string, + options?: VirtualnetworksDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, clusterName, cluster, options }, - createOperationSpec + { resourceGroupName, virtualnetworksName, options }, + deleteOperationSpec ); } /** - * 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 virtualnetworksName + * @param virtualnetworks The virtualnetworks resource patch definition. * @param options The options parameters. */ update( resourceGroupName: string, - clusterName: string, - cluster: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise { + virtualnetworksName: string, + virtualnetworks: VirtualnetworksPatch, + options?: VirtualnetworksUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, clusterName, cluster, options }, + { resourceGroupName, virtualnetworksName, virtualnetworks, 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. */ - delete( + private _listByResourceGroup( resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise { + options?: VirtualnetworksListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - deleteOperationSpec + { resourceGroupName, options }, + listByResourceGroupOperationSpec ); } - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ClustersListBySubscriptionNextOptionalParams - ): Promise { + /** @param options The options parameters. */ + private _listBySubscription( + options?: VirtualnetworksListBySubscriptionOptionalParams + ): Promise { return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec + { options }, + listBySubscriptionOperationSpec ); } @@ -264,63 +311,94 @@ export class ClustersImpl implements Clusters { private _listByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: ClustersListByResourceGroupNextOptionalParams - ): Promise { + options?: VirtualnetworksListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec ); } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: VirtualnetworksListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { +const retrieveOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualnetworks/{virtualnetworksName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.Virtualnetworks }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualnetworksName + ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualnetworks/{virtualnetworksName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.Virtualnetworks + }, + 201: { + bodyMapper: Mappers.Virtualnetworks + }, + 202: { + bodyMapper: Mappers.Virtualnetworks + }, + 204: { + bodyMapper: Mappers.Virtualnetworks }, default: { bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.virtualnetworks, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.virtualnetworksName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualnetworks/{virtualnetworksName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.Cluster - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -330,86 +408,79 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.virtualnetworksName ], headerParameters: [Parameters.accept], serializer }; -const createOperationSpec: coreClient.OperationSpec = { +const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "PUT", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualnetworks/{virtualnetworksName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.Cluster + bodyMapper: Mappers.Virtualnetworks }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.cluster, + requestBody: Parameters.virtualnetworks1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.clusterName + Parameters.virtualnetworksName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const updateOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "PATCH", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualnetworks", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Cluster + bodyMapper: Mappers.VirtualnetworksListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.cluster1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName + Parameters.resourceGroupName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const deleteOperationSpec: coreClient.OperationSpec = { +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}", - httpMethod: "DELETE", + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualnetworks", + httpMethod: "GET", responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.VirtualnetworksListResult + }, 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 listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.VirtualnetworksListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -419,17 +490,18 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ClusterList + bodyMapper: Mappers.VirtualnetworksListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -439,7 +511,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], 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 b8541458da21..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts +++ /dev/null @@ -1,89 +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, - ArcSettingsDeleteOptionalParams -} 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; - /** - * 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; -} 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 44fdb94966e9..000000000000 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts +++ /dev/null @@ -1,91 +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 { - Cluster, - ClustersListBySubscriptionOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOptionalParams, - ClustersCreateResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams -} 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. - */ - delete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): 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..248067e12cfd --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/galleryimagesOperations.ts @@ -0,0 +1,110 @@ +/* + * 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 { + Galleryimages, + GalleryimagesListByResourceGroupOptionalParams, + GalleryimagesListBySubscriptionOptionalParams, + GalleryimagesRetrieveOptionalParams, + GalleryimagesRetrieveResponse, + GalleryimagesCreateOrUpdateOptionalParams, + GalleryimagesCreateOrUpdateResponse, + GalleryimagesDeleteOptionalParams, + GalleryimagesPatch, + GalleryimagesUpdateOptionalParams, + GalleryimagesUpdateResponse +} from "../models"; + +/// +/** Interface representing a GalleryimagesOperations. */ +export interface GalleryimagesOperations { + /** + * Lists all galleryimages under the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: GalleryimagesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List all galleryimages under the subscription + * @param options The options parameters. + */ + listBySubscription( + options?: GalleryimagesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all galleryimages under the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + galleryimagesName: string, + options?: GalleryimagesRetrieveOptionalParams + ): Promise; + /** + * Create or update a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param galleryimages The galleryimages resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryimagesName: string, + galleryimages: Galleryimages, + options?: GalleryimagesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryimagesCreateOrUpdateResponse + > + >; + /** + * Create or update a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param galleryimages The galleryimages resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryimagesName: string, + galleryimages: Galleryimages, + options?: GalleryimagesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + galleryimagesName: string, + options?: GalleryimagesDeleteOptionalParams + ): Promise; + /** + * Update a galleryimage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param galleryimagesName Name of the gallery image + * @param galleryimages The galleryimages resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + galleryimagesName: string, + galleryimages: GalleryimagesPatch, + options?: GalleryimagesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts index 2d20c6edaf47..3944aa3c0c4c 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts @@ -6,7 +6,9 @@ * 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 "./networkinterfacesOperations"; +export * from "./virtualharddisksOperations"; +export * from "./virtualmachinesOperations"; +export * from "./virtualnetworksOperations"; export * from "./operations"; 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..f42128393e34 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/networkinterfacesOperations.ts @@ -0,0 +1,101 @@ +/* + * 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 { + Networkinterfaces, + NetworkinterfacesListByResourceGroupOptionalParams, + NetworkinterfacesListBySubscriptionOptionalParams, + NetworkinterfacesRetrieveOptionalParams, + NetworkinterfacesRetrieveResponse, + NetworkinterfacesCreateOrUpdateOptionalParams, + NetworkinterfacesCreateOrUpdateResponse, + NetworkinterfacesDeleteOptionalParams, + NetworkinterfacesPatch, + NetworkinterfacesUpdateOptionalParams, + NetworkinterfacesUpdateResponse +} from "../models"; + +/// +/** Interface representing a NetworkinterfacesOperations. */ +export interface NetworkinterfacesOperations { + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: NetworkinterfacesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** @param options The options parameters. */ + listBySubscription( + options?: NetworkinterfacesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + networkinterfacesName: string, + options?: NetworkinterfacesRetrieveOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param networkinterfaces The networkinterfaces resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + networkinterfacesName: string, + networkinterfaces: Networkinterfaces, + options?: NetworkinterfacesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + NetworkinterfacesCreateOrUpdateResponse + > + >; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param networkinterfaces The networkinterfaces resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + networkinterfacesName: string, + networkinterfaces: Networkinterfaces, + options?: NetworkinterfacesCreateOrUpdateOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + networkinterfacesName: string, + options?: NetworkinterfacesDeleteOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkinterfacesName + * @param networkinterfaces The networkinterfaces resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + networkinterfacesName: string, + networkinterfaces: NetworkinterfacesPatch, + options?: NetworkinterfacesUpdateOptionalParams + ): 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..0592b6ce5020 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualharddisksOperations.ts @@ -0,0 +1,101 @@ +/* + * 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 { + Virtualharddisks, + VirtualharddisksListByResourceGroupOptionalParams, + VirtualharddisksListBySubscriptionOptionalParams, + VirtualharddisksRetrieveOptionalParams, + VirtualharddisksRetrieveResponse, + VirtualharddisksCreateOrUpdateOptionalParams, + VirtualharddisksCreateOrUpdateResponse, + VirtualharddisksDeleteOptionalParams, + VirtualharddisksPatch, + VirtualharddisksUpdateOptionalParams, + VirtualharddisksUpdateResponse +} from "../models"; + +/// +/** Interface representing a VirtualharddisksOperations. */ +export interface VirtualharddisksOperations { + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: VirtualharddisksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** @param options The options parameters. */ + listBySubscription( + options?: VirtualharddisksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + virtualharddisksName: string, + options?: VirtualharddisksRetrieveOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param virtualharddisks The virtualharddisks resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + virtualharddisksName: string, + virtualharddisks: Virtualharddisks, + options?: VirtualharddisksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualharddisksCreateOrUpdateResponse + > + >; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param virtualharddisks The virtualharddisks resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualharddisksName: string, + virtualharddisks: Virtualharddisks, + options?: VirtualharddisksCreateOrUpdateOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + virtualharddisksName: string, + options?: VirtualharddisksDeleteOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualharddisksName + * @param virtualharddisks The virtualharddisks resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + virtualharddisksName: string, + virtualharddisks: VirtualharddisksPatch, + options?: VirtualharddisksUpdateOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualmachinesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualmachinesOperations.ts new file mode 100644 index 000000000000..8095c7e5fe64 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualmachinesOperations.ts @@ -0,0 +1,164 @@ +/* + * 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 { + Virtualmachines, + VirtualmachinesListByResourceGroupOptionalParams, + VirtualmachinesListBySubscriptionOptionalParams, + VirtualmachinesRetrieveOptionalParams, + VirtualmachinesRetrieveResponse, + VirtualmachinesCreateOrUpdateOptionalParams, + VirtualmachinesCreateOrUpdateResponse, + VirtualmachinesDeleteOptionalParams, + VirtualmachinesPatch, + VirtualmachinesUpdateOptionalParams, + VirtualmachinesUpdateResponse, + VirtualmachinesStartOptionalParams, + VirtualmachinesStopOptionalParams, + VirtualmachinesRestartOptionalParams +} from "../models"; + +/// +/** Interface representing a VirtualmachinesOperations. */ +export interface VirtualmachinesOperations { + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: VirtualmachinesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** @param options The options parameters. */ + listBySubscription( + options?: VirtualmachinesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesRetrieveOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param virtualmachines The virtualmachines resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + virtualmachinesName: string, + virtualmachines: Virtualmachines, + options?: VirtualmachinesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualmachinesCreateOrUpdateResponse + > + >; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param virtualmachines The virtualmachines resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualmachinesName: string, + virtualmachines: Virtualmachines, + options?: VirtualmachinesCreateOrUpdateOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesDeleteOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param virtualmachines The virtualmachines resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + virtualmachinesName: string, + virtualmachines: VirtualmachinesPatch, + options?: VirtualmachinesUpdateOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStartOptionalParams + ): Promise, void>>; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStartOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + beginStop( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStopOptionalParams + ): Promise, void>>; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + beginStopAndWait( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesStopOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesRestartOptionalParams + ): Promise, void>>; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualmachinesName + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + virtualmachinesName: string, + options?: VirtualmachinesRestartOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualnetworksOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualnetworksOperations.ts new file mode 100644 index 000000000000..b49e92b06a5d --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/virtualnetworksOperations.ts @@ -0,0 +1,101 @@ +/* + * 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 { + Virtualnetworks, + VirtualnetworksListByResourceGroupOptionalParams, + VirtualnetworksListBySubscriptionOptionalParams, + VirtualnetworksRetrieveOptionalParams, + VirtualnetworksRetrieveResponse, + VirtualnetworksCreateOrUpdateOptionalParams, + VirtualnetworksCreateOrUpdateResponse, + VirtualnetworksDeleteOptionalParams, + VirtualnetworksPatch, + VirtualnetworksUpdateOptionalParams, + VirtualnetworksUpdateResponse +} from "../models"; + +/// +/** Interface representing a VirtualnetworksOperations. */ +export interface VirtualnetworksOperations { + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: VirtualnetworksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** @param options The options parameters. */ + listBySubscription( + options?: VirtualnetworksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName + * @param options The options parameters. + */ + retrieve( + resourceGroupName: string, + virtualnetworksName: string, + options?: VirtualnetworksRetrieveOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName + * @param virtualnetworks The virtualnetworks resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + virtualnetworksName: string, + virtualnetworks: Virtualnetworks, + options?: VirtualnetworksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualnetworksCreateOrUpdateResponse + > + >; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName + * @param virtualnetworks The virtualnetworks resource definition. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + virtualnetworksName: string, + virtualnetworks: Virtualnetworks, + options?: VirtualnetworksCreateOrUpdateOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + virtualnetworksName: string, + options?: VirtualnetworksDeleteOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualnetworksName + * @param virtualnetworks The virtualnetworks resource patch definition. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + virtualnetworksName: string, + virtualnetworks: VirtualnetworksPatch, + options?: VirtualnetworksUpdateOptionalParams + ): Promise; +} 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"