diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b12b4835b637..76171049277f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -336,6 +336,9 @@ /sdk/cosmosdb/arm-cosmosdb/ @qiaozha @MaryGao /sdk/cosmosdb/ci.mgmt.yml @qiaozha @MaryGao +# PRLabel: %Mgmt +/sdk/connectedvmware/arm-connectedvmware/ @qiaozha @MaryGao + # PRLabel: %Mgmt /sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/ @qiaozha @MaryGao /sdk/cosmosforpostgresql/ci.mgmt.yml @qiaozha @MaryGao diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 93629ea6cb98..7ee9a4808b8b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4458,7 +4458,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231024 + typescript: 5.3.0-dev.20231025 dev: false /eastasianwidth@0.2.0: @@ -9084,8 +9084,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231024: - resolution: {integrity: sha512-g+l6xRJNUswhIYSkjTqICwdZofhieh3P7wLP+Zp1tPgF/EBDKDtG+JvMd/WchTd0GY00Tg3u41dbaySqDA9thw==} + /typescript@5.3.0-dev.20231025: + resolution: {integrity: sha512-DW0GNkWzKHnI9lcYCVIw5SO5nzlaZ9iHAdcN7zCxt/OJsKg7s33xRtEa5nmPTIC5qvKzLLZboWWBJ+KRD9cKFw==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -11280,7 +11280,7 @@ packages: dev: false file:projects/arm-connectedvmware.tgz: - resolution: {integrity: sha512-GMb0xs8mBmSkxsDbu4ocyil+kk7MRUTydVZ4lJnbxRgsQtFJUF+dJumrDh9OmLM122PiC21NQI3hbMPe8jb/hw==, tarball: file:projects/arm-connectedvmware.tgz} + resolution: {integrity: sha512-XcxyNGvLTm8uOBUkuhQfHMVTqOrxNYM/c6X9jfo68QyDS9Gn3I1yo4qAtJ+5GNPDxfUZIomMyvxVreGJr/cU6g==, tarball: file:projects/arm-connectedvmware.tgz} name: '@rush-temp/arm-connectedvmware' version: 0.0.0 dependencies: @@ -11292,7 +11292,7 @@ packages: dotenv: 16.3.1 mkdirp: 1.0.4 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@16.18.59)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -11868,7 +11868,7 @@ packages: dev: false file:projects/arm-devcenter.tgz: - resolution: {integrity: sha512-/angxbieMkKcJsQJdqNc+zy25g0XoAOpcDa6DASkRdfp2uNoq/Uj9I3FDFf3lzreh9d0e26JB4Kn8PcPUACleg==, tarball: file:projects/arm-devcenter.tgz} + resolution: {integrity: sha512-K5dsNt8WmABkxTXGXEc7EABDWa8n976i5C/w9YM/9FUNfsYCpo8CUkgKH+eIo1dYQ9mq7PLW43LZVU+GOq8LLQ==, tarball: file:projects/arm-devcenter.tgz} name: '@rush-temp/arm-devcenter' version: 0.0.0 dependencies: @@ -12759,7 +12759,7 @@ packages: dev: false file:projects/arm-keyvault.tgz: - resolution: {integrity: sha512-f1Y090+FjIYGgVrBYGG1+mRJl2uH27vEsXhQG9zh2By/YXkTNL/gEJuC73RbAu2j5aNA+ygpwG5OoJ8WyV+0zA==, tarball: file:projects/arm-keyvault.tgz} + resolution: {integrity: sha512-mJZb076NjWXPWX+BubEqM/+ZwVL4kqwgnl2zEIMwbduph1qBMxpy4Ep+H6ZKVPRkN+cGK9/FGYim6K9gMN2VXQ==, tarball: file:projects/arm-keyvault.tgz} name: '@rush-temp/arm-keyvault' version: 0.0.0 dependencies: @@ -14171,7 +14171,7 @@ packages: dev: false file:projects/arm-recoveryservicesdatareplication.tgz: - resolution: {integrity: sha512-P2ShC9/4EXm4vIJRDEm1YSx2InnENT2cuOXxSYZCBwpQqxfjeaKienST4FM8v2zV6HL3tM/4H1Qw8Ebl5m4GhQ==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} + resolution: {integrity: sha512-c3iqbkXdtfIbpO1YWP1PzcuD7idEEBAukQ1E07PcuURdAT3yZWGGyMIp/mG6966hs4yaIxK9H0F5l3jdfGVZlw==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} name: '@rush-temp/arm-recoveryservicesdatareplication' version: 0.0.0 dependencies: @@ -14337,7 +14337,7 @@ packages: dev: false file:projects/arm-resourcehealth.tgz: - resolution: {integrity: sha512-Vi11ByWkUqB6+KrUx1OqvaUODlyNFx2dCi0ZBDdCTzTMUmnGIFROrswsFeJ+IzxeOrh4TwHtQAYT8AakTbkRNA==, tarball: file:projects/arm-resourcehealth.tgz} + resolution: {integrity: sha512-WfSg3UfoZo/16YZM6vtq4nGyHEoDGifURwH76iVIvEC3Za1wzaSGp8hilf/G+zo//WRTFkbXcxMsq4rjlIvRcQ==, tarball: file:projects/arm-resourcehealth.tgz} name: '@rush-temp/arm-resourcehealth' version: 0.0.0 dependencies: @@ -15161,7 +15161,7 @@ packages: dev: false file:projects/arm-support.tgz: - resolution: {integrity: sha512-C3MECBBBJ2MFTOqGTI8ZRsXsYSIMDmwdXs7dsoiwzfAzULzsPclqcCv67S3cQnhEQZ9BXSs8r2S9CnhgEnLd0A==, tarball: file:projects/arm-support.tgz} + resolution: {integrity: sha512-VJNVcMTPsYDEREGB+/MlH0VKcKBp6sFBZclB3nfB394j4g5vCkvpk6q1WFcn/d8udHhGo8mI4XiNdfN43Mu6sQ==, tarball: file:projects/arm-support.tgz} name: '@rush-temp/arm-support' version: 0.0.0 dependencies: @@ -17783,7 +17783,7 @@ packages: dev: false file:projects/keyvault-certificates.tgz: - resolution: {integrity: sha512-I2HoDbXKPMnWCzSLvBfSeRvhcEcjo5QbWjR69KuNMGEeNtuyi9ZIYdRhvDkh1jhmXF0pUFIO+gxW1fDLZNHL+w==, tarball: file:projects/keyvault-certificates.tgz} + resolution: {integrity: sha512-N3MzxkAtHFu1M6+2m0+9fYOpGu66U9JAjLwxrkMPgj/qtovuH2m8lFizg6B4k4mnWSo19Z0kl04vF7nNS9CR6g==, tarball: file:projects/keyvault-certificates.tgz} name: '@rush-temp/keyvault-certificates' version: 0.0.0 dependencies: diff --git a/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md b/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md index 7216a54e6099..8caa6cd8e4f8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md +++ b/sdk/connectedvmware/arm-connectedvmware/CHANGELOG.md @@ -1,22 +1,5 @@ # Release History - -## 1.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.2 (2022-12-30) - -**Features** - - - Interface MachineExtensionsListNextOptionalParams no longer has parameter expand - -## 1.0.0-beta.1 (2022-08-15) +## 1.0.0 (2023-10-24) -The package of @azure/arm-connectedvmware is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-connectedvmware is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/connectedvmware/arm-connectedvmware/LICENSE b/sdk/connectedvmware/arm-connectedvmware/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/connectedvmware/arm-connectedvmware/LICENSE +++ b/sdk/connectedvmware/arm-connectedvmware/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/connectedvmware/arm-connectedvmware/README.md b/sdk/connectedvmware/arm-connectedvmware/README.md index b1a6ee39aa3e..e3baa38c2424 100644 --- a/sdk/connectedvmware/arm-connectedvmware/README.md +++ b/sdk/connectedvmware/arm-connectedvmware/README.md @@ -6,7 +6,7 @@ Self service experience for VMware. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-connectedvmware) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/connectedvmware/arm-connectedvmware/_meta.json b/sdk/connectedvmware/arm-connectedvmware/_meta.json index a4aac0211366..2fd2a58c0282 100644 --- a/sdk/connectedvmware/arm-connectedvmware/_meta.json +++ b/sdk/connectedvmware/arm-connectedvmware/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f38115ac455af89493b0a0719d9a987404560dda", + "commit": "6a2e3c7617314fe4ea7e5706da5437214e8a602b", "readme": "specification/connectedvmware/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\connectedvmware\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\connectedvmware\\resource-manager\\readme.md --use=@autorest/typescript@6.0.9 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.5.20221215.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@6.0.9" } \ No newline at end of file diff --git a/sdk/connectedvmware/arm-connectedvmware/assets.json b/sdk/connectedvmware/arm-connectedvmware/assets.json index 8453fa925d37..3b7fadb1f42c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/assets.json +++ b/sdk/connectedvmware/arm-connectedvmware/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/connectedvmware/arm-connectedvmware", - "Tag": "js/connectedvmware/arm-connectedvmware_9a82fa52e7" + "Tag": "js/connectedvmware/arm-connectedvmware_205508ffa7" } diff --git a/sdk/connectedvmware/arm-connectedvmware/package.json b/sdk/connectedvmware/arm-connectedvmware/package.json index 559e7b77f0bd..8418d70a300d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/package.json +++ b/sdk/connectedvmware/arm-connectedvmware/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureArcVMwareManagementServiceAPI.", - "version": "1.0.0-beta.3", + "version": "1.0.0", "engines": { "node": ">=16.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -32,7 +32,7 @@ "mkdirp": "^1.0.4", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", @@ -77,7 +77,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", diff --git a/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md b/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md index 4e02efffbb48..1e1c279b4700 100644 --- a/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md +++ b/sdk/connectedvmware/arm-connectedvmware/review/arm-connectedvmware.api.md @@ -6,28 +6,16 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; - -// @public -export interface AvailablePatchCountByClassification { - readonly critical?: number; - readonly definition?: number; - readonly featurePack?: number; - readonly other?: number; - readonly security?: number; - readonly servicePack?: number; - readonly tools?: number; - readonly updateRollup?: number; - readonly updates?: number; -} +import { SimplePollerLike } from '@azure/core-lro'; // @public (undocumented) export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureArcVMwareManagementServiceAPIOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: AzureArcVMwareManagementServiceAPIOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -35,29 +23,27 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient // (undocumented) datastores: Datastores; // (undocumented) - guestAgents: GuestAgents; - // (undocumented) hosts: Hosts; // (undocumented) - hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; - // (undocumented) inventoryItems: InventoryItems; // (undocumented) - machineExtensions: MachineExtensions; - // (undocumented) operations: Operations; // (undocumented) resourcePools: ResourcePools; // (undocumented) - subscriptionId: string; + subscriptionId?: string; // (undocumented) vCenters: VCenters; // (undocumented) - virtualMachines: VirtualMachines; + virtualMachineInstances: VirtualMachineInstances; // (undocumented) virtualMachineTemplates: VirtualMachineTemplates; // (undocumented) virtualNetworks: VirtualNetworks; + // (undocumented) + vMInstanceGuestAgents: VMInstanceGuestAgents; + // (undocumented) + vmInstanceHybridIdentityMetadataOperations: VmInstanceHybridIdentityMetadataOperations; } // @public @@ -80,13 +66,17 @@ export interface Cluster { moRefId?: string; readonly name?: string; readonly networkIds?: string[]; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { [propertyName: string]: string; }; + readonly totalCpuMHz?: number; + readonly totalMemoryGB?: number; readonly type?: string; + readonly usedCpuMHz?: number; + readonly usedMemoryGB?: number; readonly uuid?: string; vCenterId?: string; } @@ -98,9 +88,9 @@ export interface ClusterInventoryItem extends InventoryItemProperties { // @public export interface Clusters { - beginCreate(resourceGroupName: string, clusterName: string, options?: ClustersCreateOptionalParams): Promise, ClustersCreateResponse>>; + beginCreate(resourceGroupName: string, clusterName: string, options?: ClustersCreateOptionalParams): Promise, ClustersCreateResponse>>; beginCreateAndWait(resourceGroupName: string, clusterName: string, options?: ClustersCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; list(options?: ClustersListOptionalParams): PagedAsyncIterableIterator; @@ -118,6 +108,12 @@ export interface ClustersCreateOptionalParams extends coreClient.OperationOption // @public export type ClustersCreateResponse = Cluster; +// @public +export interface ClustersDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -187,8 +183,10 @@ export type CreatedByType = string; // @public export interface Datastore { + readonly capacityGB?: number; readonly customResourceName?: string; extendedLocation?: ExtendedLocation; + readonly freeSpaceGB?: number; readonly id?: string; inventoryItemId?: string; kind?: string; @@ -216,9 +214,9 @@ export interface DatastoreInventoryItem extends InventoryItemProperties { // @public export interface Datastores { - beginCreate(resourceGroupName: string, datastoreName: string, options?: DatastoresCreateOptionalParams): Promise, DatastoresCreateResponse>>; + beginCreate(resourceGroupName: string, datastoreName: string, options?: DatastoresCreateOptionalParams): Promise, DatastoresCreateResponse>>; beginCreateAndWait(resourceGroupName: string, datastoreName: string, options?: DatastoresCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise; get(resourceGroupName: string, datastoreName: string, options?: DatastoresGetOptionalParams): Promise; list(options?: DatastoresListOptionalParams): PagedAsyncIterableIterator; @@ -236,6 +234,12 @@ export interface DatastoresCreateOptionalParams extends coreClient.OperationOpti // @public export type DatastoresCreateResponse = Datastore; +// @public +export interface DatastoresDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface DatastoresDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -299,23 +303,23 @@ export type DiskMode = string; export type DiskType = string; // @public -export interface ErrorDefinition { - readonly code?: string; - readonly details?: ErrorDefinition[]; - readonly message?: string; +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; } // @public export interface ErrorDetail { - code: string; - details?: ErrorDetail[]; - message: string; - target?: string; + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; } // @public export interface ErrorResponse { - error?: ErrorDefinition; + error?: ErrorDetail; } // @public @@ -335,11 +339,11 @@ export interface GuestAgent extends ProxyResource { credentials?: GuestCredential; readonly customResourceName?: string; httpProxyConfig?: HttpProxyConfiguration; + privateLinkScopeResourceId?: string; provisioningAction?: ProvisioningAction; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly status?: string; readonly statuses?: ResourceStatus[]; - readonly systemData?: SystemData; readonly uuid?: string; } @@ -349,62 +353,6 @@ export interface GuestAgentList { value: GuestAgent[]; } -// @public -export interface GuestAgentProfile { - readonly agentVersion?: string; - readonly errorDetails?: ErrorDetail[]; - readonly lastStatusChange?: Date; - readonly status?: StatusTypes; - readonly vmUuid?: string; -} - -// @public -export interface GuestAgents { - beginCreate(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsCreateOptionalParams): Promise, GuestAgentsCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, name: string, options?: GuestAgentsGetOptionalParams): Promise; - listByVm(resourceGroupName: string, virtualMachineName: string, options?: GuestAgentsListByVmOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GuestAgentsCreateOptionalParams extends coreClient.OperationOptions { - body?: GuestAgent; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type GuestAgentsCreateResponse = GuestAgent; - -// @public -export interface GuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface GuestAgentsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsGetResponse = GuestAgent; - -// @public -export interface GuestAgentsListByVmNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsListByVmNextResponse = GuestAgentList; - -// @public -export interface GuestAgentsListByVmOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GuestAgentsListByVmResponse = GuestAgentList; - // @public export interface GuestCredential { password?: string; @@ -423,16 +371,22 @@ export interface HardwareProfile { // @public export interface Host { + readonly cpuMhz?: number; readonly customResourceName?: string; + readonly datastoreIds?: string[]; extendedLocation?: ExtendedLocation; readonly id?: string; inventoryItemId?: string; kind?: string; location: string; + readonly memorySizeGB?: number; readonly moName?: string; moRefId?: string; readonly name?: string; - readonly provisioningState?: string; + readonly networkIds?: string[]; + readonly overallCpuUsageMHz?: number; + readonly overallMemoryUsageGB?: number; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -451,9 +405,9 @@ export interface HostInventoryItem extends InventoryItemProperties { // @public export interface Hosts { - beginCreate(resourceGroupName: string, hostName: string, options?: HostsCreateOptionalParams): Promise, HostsCreateResponse>>; + beginCreate(resourceGroupName: string, hostName: string, options?: HostsCreateOptionalParams): Promise, HostsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, hostName: string, options?: HostsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams): Promise; get(resourceGroupName: string, hostName: string, options?: HostsGetOptionalParams): Promise; list(options?: HostsListOptionalParams): PagedAsyncIterableIterator; @@ -471,6 +425,12 @@ export interface HostsCreateOptionalParams extends coreClient.OperationOptions { // @public export type HostsCreateResponse = Host; +// @public +export interface HostsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface HostsDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -533,71 +493,19 @@ export interface HttpProxyConfiguration { } // @public -export interface HybridIdentityMetadata extends ProxyResource { - readonly identity?: Identity; - readonly provisioningState?: string; - publicKey?: string; - readonly systemData?: SystemData; - vmId?: string; -} - -// @public -export interface HybridIdentityMetadataCreateOptionalParams extends coreClient.OperationOptions { - body?: HybridIdentityMetadata; -} - -// @public -export type HybridIdentityMetadataCreateResponse = HybridIdentityMetadata; - -// @public -export interface HybridIdentityMetadataDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface HybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; - -// @public -export interface HybridIdentityMetadataList { - nextLink?: string; - value: HybridIdentityMetadata[]; -} - -// @public -export interface HybridIdentityMetadataListByVmNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HybridIdentityMetadataListByVmNextResponse = HybridIdentityMetadataList; - -// @public -export interface HybridIdentityMetadataListByVmOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HybridIdentityMetadataListByVmResponse = HybridIdentityMetadataList; - -// @public -export interface HybridIdentityMetadataOperations { - create(resourceGroupName: string, virtualMachineName: string, metadataName: string, options?: HybridIdentityMetadataCreateOptionalParams): Promise; - delete(resourceGroupName: string, virtualMachineName: string, metadataName: string, options?: HybridIdentityMetadataDeleteOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, metadataName: string, options?: HybridIdentityMetadataGetOptionalParams): Promise; - listByVm(resourceGroupName: string, virtualMachineName: string, options?: HybridIdentityMetadataListByVmOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface Identity { - readonly principalId?: string; - readonly tenantId?: string; - type: IdentityType; +export interface InfrastructureProfile { + readonly customResourceName?: string; + firmwareType?: FirmwareType; + readonly folderPath?: string; + readonly instanceUuid?: string; + inventoryItemId?: string; + readonly moName?: string; + readonly moRefId?: string; + smbiosUuid?: string; + templateId?: string; + vCenterId?: string; } -// @public -export type IdentityType = string; - // @public export interface InventoryItem extends ProxyResource { inventoryType: InventoryType; @@ -605,13 +513,13 @@ export interface InventoryItem extends ProxyResource { managedResourceId?: string; moName?: string; moRefId?: string; - readonly provisioningState?: string; - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; } // @public export interface InventoryItemDetails { inventoryItemId?: string; + inventoryType?: InventoryType; moName?: string; } @@ -621,7 +529,7 @@ export interface InventoryItemProperties { managedResourceId?: string; moName?: string; moRefId?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } // @public (undocumented) @@ -712,12 +620,6 @@ export enum KnownFirmwareType { Efi = "efi" } -// @public -export enum KnownIdentityType { - None = "None", - SystemAssigned = "SystemAssigned" -} - // @public export enum KnownInventoryType { Cluster = "Cluster", @@ -756,37 +658,6 @@ export enum KnownOsType { Windows = "Windows" } -// @public -export enum KnownOsTypeUM { - Linux = "Linux", - Windows = "Windows" -} - -// @public -export enum KnownPatchOperationStartedBy { - Platform = "Platform", - User = "User" -} - -// @public -export enum KnownPatchOperationStatus { - CompletedWithWarnings = "CompletedWithWarnings", - Failed = "Failed", - InProgress = "InProgress", - Succeeded = "Succeeded", - Unknown = "Unknown" -} - -// @public -export enum KnownPatchServiceUsed { - APT = "APT", - Unknown = "Unknown", - WU = "WU", - WUWsus = "WU_WSUS", - YUM = "YUM", - Zypper = "Zypper" -} - // @public export enum KnownPowerOnBootOption { Disabled = "disabled", @@ -820,20 +691,6 @@ export enum KnownScsiControllerType { Pvscsi = "pvscsi" } -// @public -export enum KnownStatusLevelTypes { - Error = "Error", - Info = "Info", - Warning = "Warning" -} - -// @public -export enum KnownStatusTypes { - Connected = "Connected", - Disconnected = "Disconnected", - Error = "Error" -} - // @public export enum KnownVirtualScsiSharing { NoSharing = "noSharing", @@ -841,168 +698,6 @@ export enum KnownVirtualScsiSharing { VirtualSharing = "virtualSharing" } -// @public -export enum KnownVMGuestPatchClassificationLinux { - Critical = "Critical", - Other = "Other", - Security = "Security" -} - -// @public -export enum KnownVMGuestPatchClassificationWindows { - Critical = "Critical", - Definition = "Definition", - FeaturePack = "FeaturePack", - Security = "Security", - ServicePack = "ServicePack", - Tools = "Tools", - UpdateRollUp = "UpdateRollUp", - Updates = "Updates" -} - -// @public -export enum KnownVMGuestPatchRebootSetting { - Always = "Always", - IfRequired = "IfRequired", - Never = "Never" -} - -// @public -export enum KnownVMGuestPatchRebootStatus { - Completed = "Completed", - Failed = "Failed", - NotNeeded = "NotNeeded", - Required = "Required", - Started = "Started", - Unknown = "Unknown" -} - -// @public -export interface LinuxParameters { - classificationsToInclude?: VMGuestPatchClassificationLinux[]; - packageNameMasksToExclude?: string[]; - packageNameMasksToInclude?: string[]; -} - -// @public -export interface MachineExtension { - autoUpgradeMinorVersion?: boolean; - enableAutomaticUpgrade?: boolean; - forceUpdateTag?: string; - readonly id?: string; - instanceView?: MachineExtensionPropertiesInstanceView; - location?: string; - readonly name?: string; - protectedSettings?: Record; - readonly provisioningState?: string; - publisher?: string; - settings?: Record; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; - typeHandlerVersion?: string; - typePropertiesType?: string; -} - -// @public -export interface MachineExtensionInstanceView { - readonly name?: string; - status?: MachineExtensionInstanceViewStatus; - readonly type?: string; - readonly typeHandlerVersion?: string; -} - -// @public -export interface MachineExtensionInstanceViewStatus { - readonly code?: string; - readonly displayStatus?: string; - readonly level?: StatusLevelTypes; - readonly message?: string; - readonly time?: Date; -} - -// @public -export interface MachineExtensionPropertiesInstanceView extends MachineExtensionInstanceView { -} - -// @public -export interface MachineExtensions { - beginCreateOrUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, name: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, name: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, name: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise; - get(resourceGroupName: string, name: string, extensionName: string, options?: MachineExtensionsGetOptionalParams): Promise; - list(resourceGroupName: string, name: string, options?: MachineExtensionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MachineExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type MachineExtensionsCreateOrUpdateResponse = MachineExtension; - -// @public -export interface MachineExtensionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface MachineExtensionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MachineExtensionsGetResponse = MachineExtension; - -// @public -export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MachineExtensionsListNextResponse = MachineExtensionsListResult; - -// @public -export interface MachineExtensionsListOptionalParams extends coreClient.OperationOptions { - expand?: string; -} - -// @public -export type MachineExtensionsListResponse = MachineExtensionsListResult; - -// @public -export interface MachineExtensionsListResult { - nextLink?: string; - value?: MachineExtension[]; -} - -// @public -export interface MachineExtensionsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type MachineExtensionsUpdateResponse = MachineExtension; - -// @public -export interface MachineExtensionUpdate extends ResourcePatch { - autoUpgradeMinorVersion?: boolean; - enableAutomaticUpgrade?: boolean; - forceUpdateTag?: string; - protectedSettings?: Record; - publisher?: string; - settings?: Record; - type?: string; - typeHandlerVersion?: string; -} - // @public export interface NetworkInterface { deviceKey?: number; @@ -1100,66 +795,21 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = OperationsList; // @public -export interface OsProfile { +export interface OsProfileForVMInstance { adminPassword?: string; adminUsername?: string; - readonly allowExtensionOperations?: boolean; computerName?: string; guestId?: string; - linuxConfiguration?: OsProfileLinuxConfiguration; - readonly osName?: string; + readonly osSku?: string; osType?: OsType; readonly toolsRunningStatus?: string; readonly toolsVersion?: string; readonly toolsVersionStatus?: string; - windowsConfiguration?: OsProfileWindowsConfiguration; -} - -// @public -export interface OsProfileLinuxConfiguration { - assessmentMode?: string; - patchMode?: string; -} - -// @public -export interface OsProfileUpdate { - linuxConfiguration?: OsProfileUpdateLinuxConfiguration; - windowsConfiguration?: OsProfileUpdateWindowsConfiguration; -} - -// @public -export interface OsProfileUpdateLinuxConfiguration { - assessmentMode?: string; - patchMode?: string; -} - -// @public -export interface OsProfileUpdateWindowsConfiguration { - assessmentMode?: string; - patchMode?: string; -} - -// @public -export interface OsProfileWindowsConfiguration { - assessmentMode?: string; - patchMode?: string; } // @public export type OsType = string; -// @public -export type OsTypeUM = string; - -// @public -export type PatchOperationStartedBy = string; - -// @public -export type PatchOperationStatus = string; - -// @public -export type PatchServiceUsed = string; - // @public export interface PlacementProfile { clusterId?: string; @@ -1185,6 +835,7 @@ export interface ProxyResource extends Resource { export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -1197,22 +848,28 @@ export interface ResourcePatch { // @public export interface ResourcePool { + readonly cpuCapacityMHz?: number; readonly cpuLimitMHz?: number; + readonly cpuOverallUsageMHz?: number; readonly cpuReservationMHz?: number; readonly cpuSharesLevel?: string; readonly customResourceName?: string; + readonly datastoreIds?: string[]; extendedLocation?: ExtendedLocation; readonly id?: string; inventoryItemId?: string; kind?: string; location: string; + readonly memCapacityGB?: number; readonly memLimitMB?: number; + readonly memOverallUsageGB?: number; readonly memReservationMB?: number; readonly memSharesLevel?: string; readonly moName?: string; moRefId?: string; readonly name?: string; - readonly provisioningState?: string; + readonly networkIds?: string[]; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1231,9 +888,9 @@ export interface ResourcePoolInventoryItem extends InventoryItemProperties { // @public export interface ResourcePools { - beginCreate(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams): Promise, ResourcePoolsCreateResponse>>; + beginCreate(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams): Promise, ResourcePoolsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams): Promise; get(resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsGetOptionalParams): Promise; list(options?: ResourcePoolsListOptionalParams): PagedAsyncIterableIterator; @@ -1251,6 +908,12 @@ export interface ResourcePoolsCreateOptionalParams extends coreClient.OperationO // @public export type ResourcePoolsCreateResponse = ResourcePool; +// @public +export interface ResourcePoolsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ResourcePoolsDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1325,12 +988,6 @@ export interface SecurityProfile { uefiSettings?: UefiSettings; } -// @public -export type StatusLevelTypes = string; - -// @public -export type StatusTypes = string; - // @public export interface StopVirtualMachineOptions { skipShutdown?: boolean; @@ -1375,7 +1032,7 @@ export interface VCenter { location: string; readonly name?: string; port?: number; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1388,9 +1045,9 @@ export interface VCenter { // @public export interface VCenters { - beginCreate(resourceGroupName: string, vcenterName: string, options?: VCentersCreateOptionalParams): Promise, VCentersCreateResponse>>; + beginCreate(resourceGroupName: string, vcenterName: string, options?: VCentersCreateOptionalParams): Promise, VCentersCreateResponse>>; beginCreateAndWait(resourceGroupName: string, vcenterName: string, options?: VCentersCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams): Promise; get(resourceGroupName: string, vcenterName: string, options?: VCentersGetOptionalParams): Promise; list(options?: VCentersListOptionalParams): PagedAsyncIterableIterator; @@ -1408,6 +1065,12 @@ export interface VCentersCreateOptionalParams extends coreClient.OperationOption // @public export type VCentersCreateResponse = VCenter; +// @public +export interface VCentersDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VCentersDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1497,229 +1160,179 @@ export interface VirtualDiskUpdate { } // @public -export interface VirtualMachine { - readonly customResourceName?: string; +export interface VirtualMachineInstance extends ProxyResource { extendedLocation?: ExtendedLocation; - firmwareType?: FirmwareType; - readonly folderPath?: string; - guestAgentProfile?: GuestAgentProfile; hardwareProfile?: HardwareProfile; - readonly id?: string; - identity?: Identity; - readonly instanceUuid?: string; - inventoryItemId?: string; - kind?: string; - location: string; - readonly moName?: string; - moRefId?: string; - readonly name?: string; + infrastructureProfile?: InfrastructureProfile; networkProfile?: NetworkProfile; - osProfile?: OsProfile; + osProfile?: OsProfileForVMInstance; placementProfile?: PlacementProfile; readonly powerState?: string; - readonly provisioningState?: string; - resourcePoolId?: string; + readonly provisioningState?: ProvisioningState; + readonly resourceUid?: string; securityProfile?: SecurityProfile; - smbiosUuid?: string; readonly statuses?: ResourceStatus[]; storageProfile?: StorageProfile; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - templateId?: string; - readonly type?: string; - readonly uuid?: string; - vCenterId?: string; - readonly vmId?: string; } // @public -export interface VirtualMachineAssessPatchesResult { - readonly assessmentActivityId?: string; - availablePatchCountByClassification?: AvailablePatchCountByClassification; - readonly errorDetails?: ErrorDetail; - readonly lastModifiedDateTime?: Date; - readonly osType?: OsTypeUM; - readonly patchServiceUsed?: PatchServiceUsed; - readonly rebootPending?: boolean; - readonly startDateTime?: Date; - readonly startedBy?: PatchOperationStartedBy; - readonly status?: PatchOperationStatus; +export interface VirtualMachineInstances { + beginCreateOrUpdate(resourceUri: string, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise, VirtualMachineInstancesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceUri: string, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise, VirtualMachineInstancesDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise; + beginRestart(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise, VirtualMachineInstancesRestartResponse>>; + beginRestartAndWait(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise; + beginStart(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise, VirtualMachineInstancesStartResponse>>; + beginStartAndWait(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise; + beginStop(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; + beginStopAndWait(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise; + beginUpdate(resourceUri: string, options?: VirtualMachineInstancesUpdateOptionalParams): Promise, VirtualMachineInstancesUpdateResponse>>; + beginUpdateAndWait(resourceUri: string, options?: VirtualMachineInstancesUpdateOptionalParams): Promise; + get(resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams): Promise; + list(resourceUri: string, options?: VirtualMachineInstancesListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface VirtualMachineInstallPatchesParameters { - linuxParameters?: LinuxParameters; - maximumDuration: string; - rebootSetting: VMGuestPatchRebootSetting; - windowsParameters?: WindowsParameters; -} - -// @public -export interface VirtualMachineInstallPatchesResult { - readonly errorDetails?: ErrorDetail; - readonly excludedPatchCount?: number; - readonly failedPatchCount?: number; - readonly installationActivityId?: string; - readonly installedPatchCount?: number; - readonly lastModifiedDateTime?: Date; - readonly maintenanceWindowExceeded?: boolean; - readonly notSelectedPatchCount?: number; - readonly osType?: OsTypeUM; - readonly patchServiceUsed?: PatchServiceUsed; - readonly pendingPatchCount?: number; - readonly rebootStatus?: VMGuestPatchRebootStatus; - readonly startDateTime?: Date; - readonly startedBy?: PatchOperationStartedBy; - readonly status?: PatchOperationStatus; +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineInstance; + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface VirtualMachineInventoryItem extends InventoryItemProperties { - folderPath?: string; - host?: InventoryItemDetails; - instanceUuid?: string; - inventoryType: "VirtualMachine"; - ipAddresses?: string[]; - osName?: string; - osType?: OsType; - readonly powerState?: string; - resourcePool?: InventoryItemDetails; - smbiosUuid?: string; - readonly toolsRunningStatus?: string; - readonly toolsVersion?: string; - readonly toolsVersionStatus?: string; -} +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; // @public -export interface VirtualMachines { - beginAssessPatches(resourceGroupName: string, name: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise, VirtualMachinesAssessPatchesResponse>>; - beginAssessPatchesAndWait(resourceGroupName: string, name: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise; - beginCreate(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesCreateOptionalParams): Promise, VirtualMachinesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise; - beginInstallPatches(resourceGroupName: string, name: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise, VirtualMachinesInstallPatchesResponse>>; - beginInstallPatchesAndWait(resourceGroupName: string, name: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise; - beginRestart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise, void>>; - beginRestartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise; - beginStart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise, void>>; - beginStartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise; - beginStop(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStopOptionalParams): Promise, void>>; - beginStopAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesGetOptionalParams): Promise; - list(options?: VirtualMachinesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: VirtualMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +export interface VirtualMachineInstancesDeleteHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesAssessPatchesOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesDeleteOptionalParams extends coreClient.OperationOptions { + deleteFromHost?: boolean; + force?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult; +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; // @public -export interface VirtualMachinesCreateOptionalParams extends coreClient.OperationOptions { - body?: VirtualMachine; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesCreateResponse = VirtualMachine; +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; // @public -export interface VirtualMachinesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; - resumeFrom?: string; - retain?: boolean; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesList { + nextLink?: string; + value: VirtualMachineInstance[]; } // @public -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesGetResponse = VirtualMachine; +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstancesList; // @public -export interface VirtualMachinesInstallPatchesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult; +export type VirtualMachineInstancesListResponse = VirtualMachineInstancesList; // @public -export interface VirtualMachinesList { - nextLink?: string; - value: VirtualMachine[]; +export interface VirtualMachineInstancesRestartHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachinesList; +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; // @public -export interface VirtualMachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStartHeaders { + // (undocumented) + location?: string; } // @public -export type VirtualMachinesListByResourceGroupResponse = VirtualMachinesList; - -// @public -export interface VirtualMachinesListNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type VirtualMachinesListNextResponse = VirtualMachinesList; +export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; // @public -export interface VirtualMachinesListOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStopHeaders { + // (undocumented) + location?: string; } // @public -export type VirtualMachinesListResponse = VirtualMachinesList; - -// @public -export interface VirtualMachinesRestartOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + body?: StopVirtualMachineOptions; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesStartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; + +// @public +export interface VirtualMachineInstancesUpdateHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesStopOptionalParams extends coreClient.OperationOptions { - body?: StopVirtualMachineOptions; +export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineInstanceUpdate; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesUpdateOptionalParams extends coreClient.OperationOptions { - body?: VirtualMachineUpdate; - resumeFrom?: string; - updateIntervalInMs?: number; +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstanceUpdate { + hardwareProfile?: HardwareProfile; + networkProfile?: NetworkProfileUpdate; + storageProfile?: StorageProfileUpdate; } // @public -export type VirtualMachinesUpdateResponse = VirtualMachine; +export interface VirtualMachineInventoryItem extends InventoryItemProperties { + cluster?: InventoryItemDetails; + folderPath?: string; + host?: InventoryItemDetails; + instanceUuid?: string; + inventoryType: "VirtualMachine"; + ipAddresses?: string[]; + osName?: string; + osType?: OsType; + readonly powerState?: string; + resourcePool?: InventoryItemDetails; + smbiosUuid?: string; + readonly toolsRunningStatus?: string; + readonly toolsVersion?: string; + readonly toolsVersionStatus?: string; +} // @public export interface VirtualMachineTemplate { @@ -1741,7 +1354,7 @@ export interface VirtualMachineTemplate { readonly numCPUs?: number; readonly osName?: string; readonly osType?: OsType; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1763,13 +1376,15 @@ export interface VirtualMachineTemplateInventoryItem extends InventoryItemProper numCPUs?: number; osName?: string; osType?: OsType; + readonly toolsVersion?: string; + readonly toolsVersionStatus?: string; } // @public export interface VirtualMachineTemplates { - beginCreate(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams): Promise, VirtualMachineTemplatesCreateResponse>>; + beginCreate(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams): Promise, VirtualMachineTemplatesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise; get(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesGetOptionalParams): Promise; list(options?: VirtualMachineTemplatesListOptionalParams): PagedAsyncIterableIterator; @@ -1787,6 +1402,12 @@ export interface VirtualMachineTemplatesCreateOptionalParams extends coreClient. // @public export type VirtualMachineTemplatesCreateResponse = VirtualMachineTemplate; +// @public +export interface VirtualMachineTemplatesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualMachineTemplatesDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1843,18 +1464,6 @@ export interface VirtualMachineTemplatesUpdateOptionalParams extends coreClient. // @public export type VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; -// @public -export interface VirtualMachineUpdate { - hardwareProfile?: HardwareProfile; - identity?: Identity; - networkProfile?: NetworkProfileUpdate; - osProfile?: OsProfileUpdate; - storageProfile?: StorageProfileUpdate; - tags?: { - [propertyName: string]: string; - }; -} - // @public export interface VirtualNetwork { readonly customResourceName?: string; @@ -1866,7 +1475,7 @@ export interface VirtualNetwork { readonly moName?: string; moRefId?: string; readonly name?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly statuses?: ResourceStatus[]; readonly systemData?: SystemData; tags?: { @@ -1884,9 +1493,9 @@ export interface VirtualNetworkInventoryItem extends InventoryItemProperties { // @public export interface VirtualNetworks { - beginCreate(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams): Promise, VirtualNetworksCreateResponse>>; + beginCreate(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams): Promise, VirtualNetworksCreateResponse>>; beginCreateAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksGetOptionalParams): Promise; list(options?: VirtualNetworksListOptionalParams): PagedAsyncIterableIterator; @@ -1904,6 +1513,12 @@ export interface VirtualNetworksCreateOptionalParams extends coreClient.Operatio // @public export type VirtualNetworksCreateResponse = VirtualNetwork; +// @public +export interface VirtualNetworksDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { force?: boolean; @@ -1973,24 +1588,99 @@ export interface VirtualScsiController { export type VirtualScsiSharing = string; // @public -export type VMGuestPatchClassificationLinux = string; +export interface VMInstanceGuestAgents { + beginCreate(resourceUri: string, options?: VMInstanceGuestAgentsCreateOptionalParams): Promise, VMInstanceGuestAgentsCreateResponse>>; + beginCreateAndWait(resourceUri: string, options?: VMInstanceGuestAgentsCreateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: VMInstanceGuestAgentsDeleteOptionalParams): Promise, VMInstanceGuestAgentsDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: VMInstanceGuestAgentsDeleteOptionalParams): Promise; + get(resourceUri: string, options?: VMInstanceGuestAgentsGetOptionalParams): Promise; + list(resourceUri: string, options?: VMInstanceGuestAgentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VMInstanceGuestAgentsCreateOptionalParams extends coreClient.OperationOptions { + body?: GuestAgent; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VMInstanceGuestAgentsCreateResponse = GuestAgent; + +// @public +export interface VMInstanceGuestAgentsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VMInstanceGuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VMInstanceGuestAgentsDeleteResponse = VMInstanceGuestAgentsDeleteHeaders; + +// @public +export interface VMInstanceGuestAgentsGetOptionalParams extends coreClient.OperationOptions { +} // @public -export type VMGuestPatchClassificationWindows = string; +export type VMInstanceGuestAgentsGetResponse = GuestAgent; + +// @public +export interface VMInstanceGuestAgentsListNextOptionalParams extends coreClient.OperationOptions { +} // @public -export type VMGuestPatchRebootSetting = string; +export type VMInstanceGuestAgentsListNextResponse = GuestAgentList; + +// @public +export interface VMInstanceGuestAgentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VMInstanceGuestAgentsListResponse = GuestAgentList; + +// @public +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + readonly provisioningState?: ProvisioningState; + publicKey?: string; + resourceUid?: string; +} + +// @public +export interface VmInstanceHybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VmInstanceHybridIdentityMetadataGetResponse = VmInstanceHybridIdentityMetadata; + +// @public +export interface VmInstanceHybridIdentityMetadataList { + nextLink?: string; + value: VmInstanceHybridIdentityMetadata[]; +} + +// @public +export interface VmInstanceHybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VmInstanceHybridIdentityMetadataListNextResponse = VmInstanceHybridIdentityMetadataList; + +// @public +export interface VmInstanceHybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions { +} // @public -export type VMGuestPatchRebootStatus = string; +export type VmInstanceHybridIdentityMetadataListResponse = VmInstanceHybridIdentityMetadataList; // @public -export interface WindowsParameters { - classificationsToInclude?: VMGuestPatchClassificationWindows[]; - excludeKbsRequiringReboot?: boolean; - kbNumbersToExclude?: string[]; - kbNumbersToInclude?: string[]; - maxPatchPublishDate?: Date; +export interface VmInstanceHybridIdentityMetadataOperations { + get(resourceUri: string, options?: VmInstanceHybridIdentityMetadataGetOptionalParams): Promise; + list(resourceUri: string, options?: VmInstanceHybridIdentityMetadataListOptionalParams): PagedAsyncIterableIterator; } // (No @packageDocumentation comment for this package) diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersCreateSample.ts index f06c50ebb696..7d54e418bd99 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update cluster. * * @summary Create Or Update cluster. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateCluster.json */ async function createCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersDeleteSample.ts index 88bf5233f3b9..8b8613bba167 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements cluster DELETE method. * * @summary Implements cluster DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteCluster.json */ async function deleteCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersGetSample.ts index e01ac4fc65cf..6625f471f89a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements cluster GET method. * * @summary Implements cluster GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetCluster.json */ async function getCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListByResourceGroupSample.ts index 021ced1f4183..90571c33fa08 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of clusters in a resource group. * * @summary List of clusters in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClustersByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClustersByResourceGroup.json */ async function listClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListSample.ts index 0a74a9c448e2..08adf40adfc7 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of clusters in a subscription. * * @summary List of clusters in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClusters.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClusters.json */ async function listClusters() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersUpdateSample.ts index 4bc375866e8c..7a08578af15d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/clustersUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the cluster resource. * * @summary API to update certain properties of the cluster resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateCluster.json */ async function updateCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresCreateSample.ts index 50f589a6cba1..48805bf36684 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update datastore. * * @summary Create Or Update datastore. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateDatastore.json */ async function createDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresDeleteSample.ts index 9df61f1fa600..2e0018e3873b 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements datastore DELETE method. * * @summary Implements datastore DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteDatastore.json */ async function deleteDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresGetSample.ts index a8107f4dd3c2..5f5c1e314a0d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements datastore GET method. * * @summary Implements datastore GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetDatastore.json */ async function getDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListByResourceGroupSample.ts index 4a3ac12fc60a..921db69afee0 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of datastores in a resource group. * * @summary List of datastores in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastoresByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastoresByResourceGroup.json */ async function listDatastoresByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListSample.ts index be0a68c698d7..7d9c9a11ee40 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of datastores in a subscription. * * @summary List of datastores in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastores.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastores.json */ async function listDatastores() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresUpdateSample.ts index 3b5233f4bb8d..a19efbd97d4c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/datastoresUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the datastore resource. * * @summary API to update certain properties of the datastore resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateDatastore.json */ async function updateDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsCreateSample.ts index f0d6ce626f34..01744507c615 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update host. * * @summary Create Or Update host. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateHost.json */ async function createHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsDeleteSample.ts index 52f6ac3e8eba..0fd0a01f64dd 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements host DELETE method. * * @summary Implements host DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteHost.json */ async function deleteHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsGetSample.ts index 74f9cf38f21f..e8457646386c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements host GET method. * * @summary Implements host GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetHost.json */ async function getHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListByResourceGroupSample.ts index 65e79fdd2d41..094414f829b2 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of hosts in a resource group. * * @summary List of hosts in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHostsByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHostsByResourceGroup.json */ async function listHostsByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListSample.ts index 0a85ad57f9ce..e1deb580fbc9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of hosts in a subscription. * * @summary List of hosts in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHosts.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHosts.json */ async function listHosts() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsUpdateSample.ts index dbee575ba11b..b2b5d5a7e825 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hostsUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the host resource. * * @summary API to update certain properties of the host resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateHost.json */ async function updateHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataCreateSample.ts deleted file mode 100644 index c66c27f8a372..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataCreateSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HybridIdentityMetadata, - HybridIdentityMetadataCreateOptionalParams, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create Or Update HybridIdentityMetadata. - * - * @summary Create Or Update HybridIdentityMetadata. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHybridIdentityMetadata.json - */ -async function createHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; - const body: HybridIdentityMetadata = { - publicKey: "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2", - vmId: "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c" - }; - const options: HybridIdentityMetadataCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.hybridIdentityMetadataOperations.create( - resourceGroupName, - virtualMachineName, - metadataName, - options - ); - console.log(result); -} - -async function main() { - createHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataDeleteSample.ts deleted file mode 100644 index 4e8cdf530bcd..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataDeleteSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata DELETE method. - * - * @summary Implements HybridIdentityMetadata DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHybridIdentityMetadata.json - */ -async function deleteHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.hybridIdentityMetadataOperations.delete( - resourceGroupName, - virtualMachineName, - metadataName - ); - console.log(result); -} - -async function main() { - deleteHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsCreateSample.ts index bbf53f9ef289..49a901eb2375 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update InventoryItem. * * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateInventoryItem.json */ async function createInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsDeleteSample.ts index a11cf96f74ec..c236208ec395 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements inventoryItem DELETE method. * * @summary Implements inventoryItem DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteInventoryItem.json */ async function deleteInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsGetSample.ts index 937b1200fc57..5c92f96823fd 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements InventoryItem GET method. * * @summary Implements InventoryItem GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetInventoryItem.json */ async function getInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsListByVCenterSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsListByVCenterSample.ts index 8411301c99e8..cb86e234d31d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsListByVCenterSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/inventoryItemsListByVCenterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns the list of inventoryItems of the given vCenter. * * @summary Returns the list of inventoryItems of the given vCenter. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/InventoryItems_ListByVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/InventoryItems_ListByVCenter.json */ async function inventoryItemsListByVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsCreateOrUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsCreateOrUpdateSample.ts deleted file mode 100644 index 5493b2d8398d..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MachineExtension, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to create or update the extension. - * - * @summary The operation to create or update the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/PUTExtension.json - */ -async function createOrUpdateAMachineExtensionPut() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const extensionParameters: MachineExtension = { - typePropertiesType: "CustomScriptExtension", - location: "eastus2euap", - publisher: "Microsoft.Compute", - settings: { - commandToExecute: - 'powershell.exe -c "Get-Process | Where-Object { $_.CPU -gt 10000 }"' - }, - typeHandlerVersion: "1.10" - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - extensionName, - extensionParameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAMachineExtensionPut(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsDeleteSample.ts deleted file mode 100644 index 4b3ef5c41c62..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsDeleteSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to delete the extension. - * - * @summary The operation to delete the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DELETEExtension.json - */ -async function deleteAMachineExtension() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "MMA"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.beginDeleteAndWait( - resourceGroupName, - name, - extensionName - ); - console.log(result); -} - -async function main() { - deleteAMachineExtension(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsGetSample.ts deleted file mode 100644 index dfc56e1db94c..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsGetSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to get the extension. - * - * @summary The operation to get the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GETExtension.json - */ -async function getMachineExtension() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.get( - resourceGroupName, - name, - extensionName - ); - console.log(result); -} - -async function main() { - getMachineExtension(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsListSample.ts deleted file mode 100644 index 0388acb97524..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsListSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to get all extensions of a non-Azure machine - * - * @summary The operation to get all extensions of a non-Azure machine - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/LISTExtension.json - */ -async function getAllMachineExtensions() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.machineExtensions.list( - resourceGroupName, - name - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAllMachineExtensions(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsUpdateSample.ts deleted file mode 100644 index bf529673d172..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/machineExtensionsUpdateSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MachineExtensionUpdate, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to update the extension. - * - * @summary The operation to update the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateExtension.json - */ -async function createOrUpdateAMachineExtensionPatch() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const extensionParameters: MachineExtensionUpdate = { - type: "CustomScriptExtension", - publisher: "Microsoft.Compute", - settings: { - commandToExecute: - 'powershell.exe -c "Get-Process | Where-Object { $_.CPU -lt 100 }"' - }, - typeHandlerVersion: "1.10" - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.beginUpdateAndWait( - resourceGroupName, - name, - extensionName, - extensionParameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAMachineExtensionPatch(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/operationsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/operationsListSample.ts index 716b6d06c15d..f4ea3ebf550a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/operationsListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns list of all operations. * * @summary Returns list of all operations. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListOperations.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListOperations.json */ async function listOperations() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsCreateSample.ts index d858038376b0..c6c402689d3f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update resourcePool. * * @summary Create Or Update resourcePool. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateResourcePool.json */ async function createResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsDeleteSample.ts index 9d24402e4474..fdb8328fef65 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements resourcePool DELETE method. * * @summary Implements resourcePool DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteResourcePool.json */ async function deleteResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsGetSample.ts index b4bd9030a0f3..38066b3e7947 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements resourcePool GET method. * * @summary Implements resourcePool GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetResourcePool.json */ async function getResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListByResourceGroupSample.ts index 903511fa3de3..4fda19687310 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of resourcePools in a resource group. * * @summary List of resourcePools in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePoolsByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePoolsByResourceGroup.json */ async function listResourcePoolsByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListSample.ts index c627efba5fb6..19b190355510 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of resourcePools in a subscription. * * @summary List of resourcePools in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePools.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePools.json */ async function listResourcePools() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsUpdateSample.ts index 3ba3a80609cf..f09842831ba9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/resourcePoolsUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the resourcePool resource. * * @summary API to update certain properties of the resourcePool resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateResourcePool.json */ async function updateResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersCreateSample.ts index 89b3b3b62aa1..6d040b8d90c4 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update vCenter. * * @summary Create Or Update vCenter. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVCenter.json */ async function createVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersDeleteSample.ts index 45abe9cd8153..20f8d578f256 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements vCenter DELETE method. * * @summary Implements vCenter DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVCenter.json */ async function deleteVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersGetSample.ts index d03483c7edea..97754b1bb479 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements vCenter GET method. * * @summary Implements vCenter GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVCenter.json */ async function getVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListByResourceGroupSample.ts index 4f0f5608595f..140b36de240d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of vCenters in a resource group. * * @summary List of vCenters in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCentersByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCentersByResourceGroup.json */ async function listVCentersByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListSample.ts index f6e4d7c64421..0471ba857b5e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of vCenters in a subscription. * * @summary List of vCenters in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCenters.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCenters.json */ async function listVCenters() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersUpdateSample.ts index d076716ecd2a..0ff11a6c84c0 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vCentersUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the vCenter resource. * * @summary API to update certain properties of the vCenter resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVCenter.json */ async function updateVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesCreateOrUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..4e3e6ee6000b --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesCreateOrUpdateSample.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + VirtualMachineInstance, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + AzureArcVMwareManagementServiceAPI +} from "@azure/arm-connectedvmware"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. + * + * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineInstance.json + */ +async function createVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; + const body: VirtualMachineInstance = { + extendedLocation: { + name: + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso", + type: "customLocation" + }, + hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, + infrastructureProfile: { + templateId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate", + vCenterId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter" + }, + placementProfile: { + resourcePoolId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool" + } + }; + const options: VirtualMachineInstancesCreateOrUpdateOptionalParams = { body }; + const credential = new DefaultAzureCredential(); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( + resourceUri, + options + ); + console.log(result); +} + +async function main() { + createVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesDeleteSample.ts similarity index 52% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesDeleteSample.ts index 302b90d33fc9..fd38523e49ca 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesDeleteSample.ts @@ -15,26 +15,18 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Implements virtual machine DELETE method. + * This sample demonstrates how to The operation to delete a virtual machine instance. * - * @summary Implements virtual machine DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachine.json + * @summary The operation to delete a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineInstance.json */ async function deleteVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginDeleteAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesGetSample.ts similarity index 53% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesGetSample.ts index 18e1532694b6..eec41383a3bf 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesGetSample.ts @@ -15,27 +15,17 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Implements virtual machine GET method. + * This sample demonstrates how to Retrieves information about a virtual machine instance. * - * @summary Implements virtual machine GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachine.json + * @summary Retrieves information about a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineInstance.json */ async function getVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.get( - resourceGroupName, - virtualMachineName - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesListSample.ts similarity index 53% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesListSample.ts index 43c525653fe8..d74c0010c543 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesListSample.ts @@ -15,29 +15,25 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to List of virtualMachines in a subscription. + * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. * - * @summary List of virtualMachines in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachines.json + * @summary Lists all of the virtual machine instances within the specified parent resource. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineInstances.json */ -async function listVirtualMachines() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; +async function getVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.virtualMachines.list()) { + for await (let item of client.virtualMachineInstances.list(resourceUri)) { resArray.push(item); } console.log(resArray); } async function main() { - listVirtualMachines(); + getVirtualMachine(); } main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesRestartSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesRestartSample.ts similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesRestartSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesRestartSample.ts index 7f1988dacbd3..5aea7eabd0c8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesRestartSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesRestartSample.ts @@ -15,26 +15,18 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Restart virtual machine. + * This sample demonstrates how to The operation to restart a virtual machine instance. * - * @summary Restart virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/RestartVirtualMachine.json + * @summary The operation to restart a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/RestartVirtualMachineInstance.json */ async function restartVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginRestartAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesStartSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesStartSample.ts similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesStartSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesStartSample.ts index dea89cd0b0b6..770abf329aaf 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesStartSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesStartSample.ts @@ -15,26 +15,18 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Start virtual machine. + * This sample demonstrates how to The operation to start a virtual machine instance. * - * @summary Start virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StartVirtualMachine.json + * @summary The operation to start a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StartVirtualMachineInstance.json */ async function startVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginStartAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStopSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesStopSample.ts similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStopSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesStopSample.ts index 55a835818b77..94f663ef7131 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStopSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesStopSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { StopVirtualMachineOptions, - VirtualMachinesStopOptionalParams, + VirtualMachineInstancesStopOptionalParams, AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; import { DefaultAzureCredential } from "@azure/identity"; @@ -19,28 +19,20 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Stop virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. * - * @summary Stop virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StopVirtualMachine.json + * @summary The operation to power off (stop) a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StopVirtualMachineInstance.json */ async function stopVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body: StopVirtualMachineOptions = { skipShutdown: true }; - const options: VirtualMachinesStopOptionalParams = { body }; + const options: VirtualMachineInstancesStopOptionalParams = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginStopAndWait( - resourceGroupName, - virtualMachineName, + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginStopAndWait( + resourceUri, options ); console.log(result); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesUpdateSample.ts new file mode 100644 index 000000000000..82581209ec50 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineInstancesUpdateSample.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + VirtualMachineInstanceUpdate, + VirtualMachineInstancesUpdateOptionalParams, + AzureArcVMwareManagementServiceAPI +} from "@azure/arm-connectedvmware"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to update a virtual machine instance. + * + * @summary The operation to update a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineInstance.json + */ +async function updateVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; + const body: VirtualMachineInstanceUpdate = { + hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 } + }; + const options: VirtualMachineInstancesUpdateOptionalParams = { body }; + const credential = new DefaultAzureCredential(); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginUpdateAndWait( + resourceUri, + options + ); + console.log(result); +} + +async function main() { + updateVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesCreateSample.ts index 15696ff3b74a..dcf51995e707 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update virtual machine template. * * @summary Create Or Update virtual machine template. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineTemplate.json */ async function createVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesDeleteSample.ts index 869cbf928a73..08385f0f22f5 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual machine template DELETE method. * * @summary Implements virtual machine template DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineTemplate.json */ async function deleteVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesGetSample.ts index 481b025a1ed8..41e7e0033ba5 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual machine template GET method. * * @summary Implements virtual machine template GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineTemplate.json */ async function getVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts index dd2a2cd8e742..806860319d1f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualMachineTemplates in a resource group. * * @summary List of virtualMachineTemplates in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplatesByResourceGroup.json */ async function listVirtualMachineTemplatesByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListSample.ts index 03b95df6354f..96e26d22fedb 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualMachineTemplates in a subscription. * * @summary List of virtualMachineTemplates in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplates.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplates.json */ async function listVirtualMachineTemplates() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesUpdateSample.ts index 8b31a0228d05..0a1d3e161c30 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachineTemplatesUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the virtual machine template resource. * * @summary API to update certain properties of the virtual machine template resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineTemplate.json */ async function updateVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesAssessPatchesSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesAssessPatchesSample.ts deleted file mode 100644 index 077529114069..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesAssessPatchesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to assess patches on a vSphere VMware machine identity in Azure. - * - * @summary The operation to assess patches on a vSphere VMware machine identity in Azure. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineAssessPatches.json - */ -async function assessPatchStateOfAMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroupName"; - const name = "myMachineName"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginAssessPatchesAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -async function main() { - assessPatchStateOfAMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesCreateSample.ts deleted file mode 100644 index f61a82f164e4..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesCreateSample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachine, - VirtualMachinesCreateOptionalParams, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create Or Update virtual machine. - * - * @summary Create Or Update virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachine.json - */ -async function createVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; - const body: VirtualMachine = { - extendedLocation: { - name: - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso", - type: "customLocation" - }, - hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, - location: "East US", - resourcePoolId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool", - templateId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate", - vCenterId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter" - }; - const options: VirtualMachinesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginCreateAndWait( - resourceGroupName, - virtualMachineName, - options - ); - console.log(result); -} - -async function main() { - createVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesInstallPatchesSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesInstallPatchesSample.ts deleted file mode 100644 index 015ef04aaafa..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesInstallPatchesSample.ts +++ /dev/null @@ -1,57 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineInstallPatchesParameters, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to install patches on a vSphere VMware machine identity in Azure. - * - * @summary The operation to install patches on a vSphere VMware machine identity in Azure. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineInstallPatches.json - */ -async function installPatchStateOfAMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroupName"; - const name = "myMachineName"; - const installPatchesInput: VirtualMachineInstallPatchesParameters = { - maximumDuration: "PT3H", - rebootSetting: "IfRequired", - windowsParameters: { - classificationsToInclude: ["Critical", "Security"], - maxPatchPublishDate: new Date("2022-01-15T02:36:43.0539904+00:00") - } - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginInstallPatchesAndWait( - resourceGroupName, - name, - installPatchesInput - ); - console.log(result); -} - -async function main() { - installPatchStateOfAMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesListByResourceGroupSample.ts deleted file mode 100644 index 3f195723c302..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesListByResourceGroupSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List of virtualMachines in a resource group. - * - * @summary List of virtualMachines in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachinesByResourceGroup.json - */ -async function listVirtualMachinesByResourceGroup() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.virtualMachines.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesUpdateSample.ts deleted file mode 100644 index e39c30e76427..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesUpdateSample.ts +++ /dev/null @@ -1,55 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineUpdate, - VirtualMachinesUpdateOptionalParams, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to API to update certain properties of the virtual machine resource. - * - * @summary API to update certain properties of the virtual machine resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachine.json - */ -async function updateVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; - const body: VirtualMachineUpdate = { - tags: { tag1: "value1", tag2: "value2" } - }; - const options: VirtualMachinesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options - ); - console.log(result); -} - -async function main() { - updateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksCreateSample.ts index 31d035bccc0c..310c98cd9d6a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update virtual network. * * @summary Create Or Update virtual network. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualNetwork.json */ async function createVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksDeleteSample.ts index 153275060fa9..6b7597ae0c78 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual network DELETE method. * * @summary Implements virtual network DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualNetwork.json */ async function deleteVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksGetSample.ts index 78eb1b64bef6..99bfb9043855 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual network GET method. * * @summary Implements virtual network GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualNetwork.json */ async function getVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListByResourceGroupSample.ts index bc14071c38c6..116a55b60d6f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualNetworks in a resource group. * * @summary List of virtualNetworks in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworksByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworksByResourceGroup.json */ async function listVirtualNetworksByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListSample.ts index 9fc05d17100d..1c69756f6e5c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualNetworks in a subscription. * * @summary List of virtualNetworks in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworks.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworks.json */ async function listVirtualNetworks() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksUpdateSample.ts index 70a11c2ed78f..9897800015cb 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualNetworksUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the virtual network resource. * * @summary API to update certain properties of the virtual network resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualNetwork.json */ async function updateVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsCreateSample.ts similarity index 61% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsCreateSample.ts index c227a903a3fb..94bfa5c2ad5c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { GuestAgent, - GuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateOptionalParams, AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; import { DefaultAzureCredential } from "@azure/identity"; @@ -22,31 +22,23 @@ dotenv.config(); * This sample demonstrates how to Create Or Update GuestAgent. * * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVMInstanceGuestAgent.json */ async function createGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body: GuestAgent = { credentials: { password: "", username: "tempuser" }, httpProxyConfig: { httpsProxy: "http://192.1.2.3:8080" }, + privateLinkScopeResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName", provisioningAction: "install" }; - const options: GuestAgentsCreateOptionalParams = { body }; + const options: VMInstanceGuestAgentsCreateOptionalParams = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.guestAgents.beginCreateAndWait( - resourceGroupName, - virtualMachineName, - name, + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.beginCreateAndWait( + resourceUri, options ); console.log(result); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsDeleteSample.ts similarity index 59% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsDeleteSample.ts index 8780f4ed856a..0cab41af8276 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsDeleteSample.ts @@ -18,25 +18,15 @@ dotenv.config(); * This sample demonstrates how to Implements GuestAgent DELETE method. * * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVMInstanceGuestAgent.json */ async function deleteGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.guestAgents.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - name + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.beginDeleteAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsGetSample.ts similarity index 60% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsGetSample.ts index f54c634e68b0..07dfa3927799 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsGetSample.ts @@ -18,26 +18,14 @@ dotenv.config(); * This sample demonstrates how to Implements GuestAgent GET method. * * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVMInstanceGuestAgent.json */ async function getGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.guestAgents.get( - resourceGroupName, - virtualMachineName, - name - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsListByVMSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsListSample.ts similarity index 63% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsListByVMSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsListSample.ts index 55ba13c0b972..03b3d30dca08 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsListByVMSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceGuestAgentsListSample.ts @@ -18,25 +18,15 @@ dotenv.config(); * This sample demonstrates how to Returns the list of GuestAgent of the given vm. * * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GuestAgent_ListByVm.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/VMInstanceGuestAgent_ListByVm.json */ async function guestAgentListByVM() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.guestAgents.listByVm( - resourceGroupName, - virtualMachineName - )) { + for await (let item of client.vMInstanceGuestAgents.list(resourceUri)) { resArray.push(item); } console.log(resArray); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceHybridIdentityMetadataGetSample.ts similarity index 59% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceHybridIdentityMetadataGetSample.ts index 95a9c9e28616..6edf99a00b58 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceHybridIdentityMetadataGetSample.ts @@ -18,25 +18,15 @@ dotenv.config(); * This sample demonstrates how to Implements HybridIdentityMetadata GET method. * * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHybridIdentityMetadata.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVmInstanceHybridIdentityMetadata.json */ async function getHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.hybridIdentityMetadataOperations.get( - resourceGroupName, - virtualMachineName, - metadataName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vmInstanceHybridIdentityMetadataOperations.get( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataListByVMSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceHybridIdentityMetadataListSample.ts similarity index 63% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataListByVMSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceHybridIdentityMetadataListSample.ts index f448c752ebe3..bf5fa88b1179 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataListByVMSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples-dev/vmInstanceHybridIdentityMetadataListSample.ts @@ -18,24 +18,16 @@ dotenv.config(); * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given vm. * * @summary Returns the list of HybridIdentityMetadata of the given vm. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/HybridIdentityMetadata_ListByVm.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/HybridIdentityMetadata_ListByVmInstance.json */ async function hybridIdentityMetadataListByVM() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.hybridIdentityMetadataOperations.listByVm( - resourceGroupName, - virtualMachineName + for await (let item of client.vmInstanceHybridIdentityMetadataOperations.list( + resourceUri )) { resArray.push(item); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/README.md b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/README.md deleted file mode 100644 index 8dfccb122095..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,190 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [clustersCreateSample.js][clusterscreatesample] | Create Or Update cluster. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateCluster.json | -| [clustersDeleteSample.js][clustersdeletesample] | Implements cluster DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteCluster.json | -| [clustersGetSample.js][clustersgetsample] | Implements cluster GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetCluster.json | -| [clustersListByResourceGroupSample.js][clusterslistbyresourcegroupsample] | List of clusters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClustersByResourceGroup.json | -| [clustersListSample.js][clusterslistsample] | List of clusters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClusters.json | -| [clustersUpdateSample.js][clustersupdatesample] | API to update certain properties of the cluster resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateCluster.json | -| [datastoresCreateSample.js][datastorescreatesample] | Create Or Update datastore. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateDatastore.json | -| [datastoresDeleteSample.js][datastoresdeletesample] | Implements datastore DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteDatastore.json | -| [datastoresGetSample.js][datastoresgetsample] | Implements datastore GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetDatastore.json | -| [datastoresListByResourceGroupSample.js][datastoreslistbyresourcegroupsample] | List of datastores in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastoresByResourceGroup.json | -| [datastoresListSample.js][datastoreslistsample] | List of datastores in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastores.json | -| [datastoresUpdateSample.js][datastoresupdatesample] | API to update certain properties of the datastore resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateDatastore.json | -| [guestAgentsCreateSample.js][guestagentscreatesample] | Create Or Update GuestAgent. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateGuestAgent.json | -| [guestAgentsDeleteSample.js][guestagentsdeletesample] | Implements GuestAgent DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteGuestAgent.json | -| [guestAgentsGetSample.js][guestagentsgetsample] | Implements GuestAgent GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetGuestAgent.json | -| [guestAgentsListByVMSample.js][guestagentslistbyvmsample] | Returns the list of GuestAgent of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GuestAgent_ListByVm.json | -| [hostsCreateSample.js][hostscreatesample] | Create Or Update host. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHost.json | -| [hostsDeleteSample.js][hostsdeletesample] | Implements host DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHost.json | -| [hostsGetSample.js][hostsgetsample] | Implements host GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHost.json | -| [hostsListByResourceGroupSample.js][hostslistbyresourcegroupsample] | List of hosts in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHostsByResourceGroup.json | -| [hostsListSample.js][hostslistsample] | List of hosts in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHosts.json | -| [hostsUpdateSample.js][hostsupdatesample] | API to update certain properties of the host resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateHost.json | -| [hybridIdentityMetadataCreateSample.js][hybrididentitymetadatacreatesample] | Create Or Update HybridIdentityMetadata. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHybridIdentityMetadata.json | -| [hybridIdentityMetadataDeleteSample.js][hybrididentitymetadatadeletesample] | Implements HybridIdentityMetadata DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHybridIdentityMetadata.json | -| [hybridIdentityMetadataGetSample.js][hybrididentitymetadatagetsample] | Implements HybridIdentityMetadata GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHybridIdentityMetadata.json | -| [hybridIdentityMetadataListByVMSample.js][hybrididentitymetadatalistbyvmsample] | Returns the list of HybridIdentityMetadata of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/HybridIdentityMetadata_ListByVm.json | -| [inventoryItemsCreateSample.js][inventoryitemscreatesample] | Create Or Update InventoryItem. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateInventoryItem.json | -| [inventoryItemsDeleteSample.js][inventoryitemsdeletesample] | Implements inventoryItem DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteInventoryItem.json | -| [inventoryItemsGetSample.js][inventoryitemsgetsample] | Implements InventoryItem GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetInventoryItem.json | -| [inventoryItemsListByVCenterSample.js][inventoryitemslistbyvcentersample] | Returns the list of inventoryItems of the given vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/InventoryItems_ListByVCenter.json | -| [machineExtensionsCreateOrUpdateSample.js][machineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/PUTExtension.json | -| [machineExtensionsDeleteSample.js][machineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DELETEExtension.json | -| [machineExtensionsGetSample.js][machineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GETExtension.json | -| [machineExtensionsListSample.js][machineextensionslistsample] | The operation to get all extensions of a non-Azure machine x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/LISTExtension.json | -| [machineExtensionsUpdateSample.js][machineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateExtension.json | -| [operationsListSample.js][operationslistsample] | Returns list of all operations. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListOperations.json | -| [resourcePoolsCreateSample.js][resourcepoolscreatesample] | Create Or Update resourcePool. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateResourcePool.json | -| [resourcePoolsDeleteSample.js][resourcepoolsdeletesample] | Implements resourcePool DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteResourcePool.json | -| [resourcePoolsGetSample.js][resourcepoolsgetsample] | Implements resourcePool GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetResourcePool.json | -| [resourcePoolsListByResourceGroupSample.js][resourcepoolslistbyresourcegroupsample] | List of resourcePools in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePoolsByResourceGroup.json | -| [resourcePoolsListSample.js][resourcepoolslistsample] | List of resourcePools in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePools.json | -| [resourcePoolsUpdateSample.js][resourcepoolsupdatesample] | API to update certain properties of the resourcePool resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateResourcePool.json | -| [vCentersCreateSample.js][vcenterscreatesample] | Create Or Update vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVCenter.json | -| [vCentersDeleteSample.js][vcentersdeletesample] | Implements vCenter DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVCenter.json | -| [vCentersGetSample.js][vcentersgetsample] | Implements vCenter GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVCenter.json | -| [vCentersListByResourceGroupSample.js][vcenterslistbyresourcegroupsample] | List of vCenters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCentersByResourceGroup.json | -| [vCentersListSample.js][vcenterslistsample] | List of vCenters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCenters.json | -| [vCentersUpdateSample.js][vcentersupdatesample] | API to update certain properties of the vCenter resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVCenter.json | -| [virtualMachineTemplatesCreateSample.js][virtualmachinetemplatescreatesample] | Create Or Update virtual machine template. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachineTemplate.json | -| [virtualMachineTemplatesDeleteSample.js][virtualmachinetemplatesdeletesample] | Implements virtual machine template DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachineTemplate.json | -| [virtualMachineTemplatesGetSample.js][virtualmachinetemplatesgetsample] | Implements virtual machine template GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachineTemplate.json | -| [virtualMachineTemplatesListByResourceGroupSample.js][virtualmachinetemplateslistbyresourcegroupsample] | List of virtualMachineTemplates in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json | -| [virtualMachineTemplatesListSample.js][virtualmachinetemplateslistsample] | List of virtualMachineTemplates in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplates.json | -| [virtualMachineTemplatesUpdateSample.js][virtualmachinetemplatesupdatesample] | API to update certain properties of the virtual machine template resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachineTemplate.json | -| [virtualMachinesAssessPatchesSample.js][virtualmachinesassesspatchessample] | The operation to assess patches on a vSphere VMware machine identity in Azure. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineAssessPatches.json | -| [virtualMachinesCreateSample.js][virtualmachinescreatesample] | Create Or Update virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachine.json | -| [virtualMachinesDeleteSample.js][virtualmachinesdeletesample] | Implements virtual machine DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachine.json | -| [virtualMachinesGetSample.js][virtualmachinesgetsample] | Implements virtual machine GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachine.json | -| [virtualMachinesInstallPatchesSample.js][virtualmachinesinstallpatchessample] | The operation to install patches on a vSphere VMware machine identity in Azure. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineInstallPatches.json | -| [virtualMachinesListByResourceGroupSample.js][virtualmachineslistbyresourcegroupsample] | List of virtualMachines in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachinesByResourceGroup.json | -| [virtualMachinesListSample.js][virtualmachineslistsample] | List of virtualMachines in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachines.json | -| [virtualMachinesRestartSample.js][virtualmachinesrestartsample] | Restart virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/RestartVirtualMachine.json | -| [virtualMachinesStartSample.js][virtualmachinesstartsample] | Start virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StartVirtualMachine.json | -| [virtualMachinesStopSample.js][virtualmachinesstopsample] | Stop virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StopVirtualMachine.json | -| [virtualMachinesUpdateSample.js][virtualmachinesupdatesample] | API to update certain properties of the virtual machine resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachine.json | -| [virtualNetworksCreateSample.js][virtualnetworkscreatesample] | Create Or Update virtual network. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualNetwork.json | -| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Implements virtual network DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualNetwork.json | -| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Implements virtual network GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualNetwork.json | -| [virtualNetworksListByResourceGroupSample.js][virtualnetworkslistbyresourcegroupsample] | List of virtualNetworks in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworksByResourceGroup.json | -| [virtualNetworksListSample.js][virtualnetworkslistsample] | List of virtualNetworks in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworks.json | -| [virtualNetworksUpdateSample.js][virtualnetworksupdatesample] | API to update certain properties of the virtual network resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualNetwork.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node clustersCreateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env CONNECTEDVMWARE_SUBSCRIPTION_ID="" CONNECTEDVMWARE_RESOURCE_GROUP="" node clustersCreateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[clusterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersCreateSample.js -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersDeleteSample.js -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersGetSample.js -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListByResourceGroupSample.js -[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListSample.js -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersUpdateSample.js -[datastorescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresCreateSample.js -[datastoresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresDeleteSample.js -[datastoresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresGetSample.js -[datastoreslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListByResourceGroupSample.js -[datastoreslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListSample.js -[datastoresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresUpdateSample.js -[guestagentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsCreateSample.js -[guestagentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsDeleteSample.js -[guestagentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsGetSample.js -[guestagentslistbyvmsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsListByVMSample.js -[hostscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsCreateSample.js -[hostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsDeleteSample.js -[hostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsGetSample.js -[hostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListByResourceGroupSample.js -[hostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListSample.js -[hostsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsUpdateSample.js -[hybrididentitymetadatacreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataCreateSample.js -[hybrididentitymetadatadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js -[hybrididentitymetadatagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js -[hybrididentitymetadatalistbyvmsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataListByVMSample.js -[inventoryitemscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsCreateSample.js -[inventoryitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsDeleteSample.js -[inventoryitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsGetSample.js -[inventoryitemslistbyvcentersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsListByVCenterSample.js -[machineextensionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsCreateOrUpdateSample.js -[machineextensionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsDeleteSample.js -[machineextensionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsGetSample.js -[machineextensionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsListSample.js -[machineextensionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/operationsListSample.js -[resourcepoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsCreateSample.js -[resourcepoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsDeleteSample.js -[resourcepoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsGetSample.js -[resourcepoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListByResourceGroupSample.js -[resourcepoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListSample.js -[resourcepoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsUpdateSample.js -[vcenterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersCreateSample.js -[vcentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersDeleteSample.js -[vcentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersGetSample.js -[vcenterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListByResourceGroupSample.js -[vcenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListSample.js -[vcentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersUpdateSample.js -[virtualmachinetemplatescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesCreateSample.js -[virtualmachinetemplatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesDeleteSample.js -[virtualmachinetemplatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesGetSample.js -[virtualmachinetemplateslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListByResourceGroupSample.js -[virtualmachinetemplateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListSample.js -[virtualmachinetemplatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesUpdateSample.js -[virtualmachinesassesspatchessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesAssessPatchesSample.js -[virtualmachinescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesCreateSample.js -[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesDeleteSample.js -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesGetSample.js -[virtualmachinesinstallpatchessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesInstallPatchesSample.js -[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListByResourceGroupSample.js -[virtualmachineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListSample.js -[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesRestartSample.js -[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStartSample.js -[virtualmachinesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStopSample.js -[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesUpdateSample.js -[virtualnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksCreateSample.js -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksDeleteSample.js -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksGetSample.js -[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js -[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListSample.js -[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware/README.md diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataCreateSample.js deleted file mode 100644 index 9991fd784f09..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataCreateSample.js +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create Or Update HybridIdentityMetadata. - * - * @summary Create Or Update HybridIdentityMetadata. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHybridIdentityMetadata.json - */ -async function createHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; - const body = { - publicKey: "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2", - vmId: "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c", - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.create( - resourceGroupName, - virtualMachineName, - metadataName, - options - ); - console.log(result); -} - -async function main() { - createHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js deleted file mode 100644 index 55b36e385593..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata DELETE method. - * - * @summary Implements HybridIdentityMetadata DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHybridIdentityMetadata.json - */ -async function deleteHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.delete( - resourceGroupName, - virtualMachineName, - metadataName - ); - console.log(result); -} - -async function main() { - deleteHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsCreateOrUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsCreateOrUpdateSample.js deleted file mode 100644 index a0dbeaccd48b..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to create or update the extension. - * - * @summary The operation to create or update the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/PUTExtension.json - */ -async function createOrUpdateAMachineExtensionPut() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const extensionParameters = { - typePropertiesType: "CustomScriptExtension", - location: "eastus2euap", - publisher: "Microsoft.Compute", - settings: { - commandToExecute: 'powershell.exe -c "Get-Process | Where-Object { $_.CPU -gt 10000 }"', - }, - typeHandlerVersion: "1.10", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.machineExtensions.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - extensionName, - extensionParameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAMachineExtensionPut(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsDeleteSample.js deleted file mode 100644 index d677ae868216..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsDeleteSample.js +++ /dev/null @@ -1,40 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to delete the extension. - * - * @summary The operation to delete the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DELETEExtension.json - */ -async function deleteAMachineExtension() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "MMA"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.machineExtensions.beginDeleteAndWait( - resourceGroupName, - name, - extensionName - ); - console.log(result); -} - -async function main() { - deleteAMachineExtension(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsGetSample.js deleted file mode 100644 index 960bff6550f0..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsGetSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to get the extension. - * - * @summary The operation to get the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GETExtension.json - */ -async function getMachineExtension() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.machineExtensions.get(resourceGroupName, name, extensionName); - console.log(result); -} - -async function main() { - getMachineExtension(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsListSample.js deleted file mode 100644 index d3717ba3041d..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsListSample.js +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to get all extensions of a non-Azure machine - * - * @summary The operation to get all extensions of a non-Azure machine - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/LISTExtension.json - */ -async function getAllMachineExtensions() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.machineExtensions.list(resourceGroupName, name)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAllMachineExtensions(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsUpdateSample.js deleted file mode 100644 index 6b6d19c08d24..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/machineExtensionsUpdateSample.js +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to update the extension. - * - * @summary The operation to update the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateExtension.json - */ -async function createOrUpdateAMachineExtensionPatch() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const extensionParameters = { - type: "CustomScriptExtension", - publisher: "Microsoft.Compute", - settings: { - commandToExecute: 'powershell.exe -c "Get-Process | Where-Object { $_.CPU -lt 100 }"', - }, - typeHandlerVersion: "1.10", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.machineExtensions.beginUpdateAndWait( - resourceGroupName, - name, - extensionName, - extensionParameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAMachineExtensionPatch(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesAssessPatchesSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesAssessPatchesSample.js deleted file mode 100644 index 16d1d9ea3788..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesAssessPatchesSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to assess patches on a vSphere VMware machine identity in Azure. - * - * @summary The operation to assess patches on a vSphere VMware machine identity in Azure. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineAssessPatches.json - */ -async function assessPatchStateOfAMachine() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroupName"; - const name = "myMachineName"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginAssessPatchesAndWait(resourceGroupName, name); - console.log(result); -} - -async function main() { - assessPatchStateOfAMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesCreateSample.js deleted file mode 100644 index a1d4d8e9f55e..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesCreateSample.js +++ /dev/null @@ -1,55 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create Or Update virtual machine. - * - * @summary Create Or Update virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachine.json - */ -async function createVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; - const body = { - extendedLocation: { - name: "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso", - type: "customLocation", - }, - hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, - location: "East US", - resourcePoolId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool", - templateId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate", - vCenterId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter", - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateAndWait( - resourceGroupName, - virtualMachineName, - options - ); - console.log(result); -} - -async function main() { - createVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesInstallPatchesSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesInstallPatchesSample.js deleted file mode 100644 index 06730de80818..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesInstallPatchesSample.js +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to The operation to install patches on a vSphere VMware machine identity in Azure. - * - * @summary The operation to install patches on a vSphere VMware machine identity in Azure. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineInstallPatches.json - */ -async function installPatchStateOfAMachine() { - const subscriptionId = process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroupName"; - const name = "myMachineName"; - const installPatchesInput = { - maximumDuration: "PT3H", - rebootSetting: "IfRequired", - windowsParameters: { - classificationsToInclude: ["Critical", "Security"], - maxPatchPublishDate: new Date("2022-01-15T02:36:43.0539904+00:00"), - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginInstallPatchesAndWait( - resourceGroupName, - name, - installPatchesInput - ); - console.log(result); -} - -async function main() { - installPatchStateOfAMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListByResourceGroupSample.js deleted file mode 100644 index 5593bdad984a..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List of virtualMachines in a resource group. - * - * @summary List of virtualMachines in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachinesByResourceGroup.json - */ -async function listVirtualMachinesByResourceGroup() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/README.md b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/README.md deleted file mode 100644 index b39848f6d187..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,203 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [clustersCreateSample.ts][clusterscreatesample] | Create Or Update cluster. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateCluster.json | -| [clustersDeleteSample.ts][clustersdeletesample] | Implements cluster DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteCluster.json | -| [clustersGetSample.ts][clustersgetsample] | Implements cluster GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetCluster.json | -| [clustersListByResourceGroupSample.ts][clusterslistbyresourcegroupsample] | List of clusters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClustersByResourceGroup.json | -| [clustersListSample.ts][clusterslistsample] | List of clusters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClusters.json | -| [clustersUpdateSample.ts][clustersupdatesample] | API to update certain properties of the cluster resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateCluster.json | -| [datastoresCreateSample.ts][datastorescreatesample] | Create Or Update datastore. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateDatastore.json | -| [datastoresDeleteSample.ts][datastoresdeletesample] | Implements datastore DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteDatastore.json | -| [datastoresGetSample.ts][datastoresgetsample] | Implements datastore GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetDatastore.json | -| [datastoresListByResourceGroupSample.ts][datastoreslistbyresourcegroupsample] | List of datastores in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastoresByResourceGroup.json | -| [datastoresListSample.ts][datastoreslistsample] | List of datastores in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastores.json | -| [datastoresUpdateSample.ts][datastoresupdatesample] | API to update certain properties of the datastore resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateDatastore.json | -| [guestAgentsCreateSample.ts][guestagentscreatesample] | Create Or Update GuestAgent. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateGuestAgent.json | -| [guestAgentsDeleteSample.ts][guestagentsdeletesample] | Implements GuestAgent DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteGuestAgent.json | -| [guestAgentsGetSample.ts][guestagentsgetsample] | Implements GuestAgent GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetGuestAgent.json | -| [guestAgentsListByVMSample.ts][guestagentslistbyvmsample] | Returns the list of GuestAgent of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GuestAgent_ListByVm.json | -| [hostsCreateSample.ts][hostscreatesample] | Create Or Update host. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHost.json | -| [hostsDeleteSample.ts][hostsdeletesample] | Implements host DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHost.json | -| [hostsGetSample.ts][hostsgetsample] | Implements host GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHost.json | -| [hostsListByResourceGroupSample.ts][hostslistbyresourcegroupsample] | List of hosts in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHostsByResourceGroup.json | -| [hostsListSample.ts][hostslistsample] | List of hosts in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHosts.json | -| [hostsUpdateSample.ts][hostsupdatesample] | API to update certain properties of the host resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateHost.json | -| [hybridIdentityMetadataCreateSample.ts][hybrididentitymetadatacreatesample] | Create Or Update HybridIdentityMetadata. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHybridIdentityMetadata.json | -| [hybridIdentityMetadataDeleteSample.ts][hybrididentitymetadatadeletesample] | Implements HybridIdentityMetadata DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHybridIdentityMetadata.json | -| [hybridIdentityMetadataGetSample.ts][hybrididentitymetadatagetsample] | Implements HybridIdentityMetadata GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHybridIdentityMetadata.json | -| [hybridIdentityMetadataListByVMSample.ts][hybrididentitymetadatalistbyvmsample] | Returns the list of HybridIdentityMetadata of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/HybridIdentityMetadata_ListByVm.json | -| [inventoryItemsCreateSample.ts][inventoryitemscreatesample] | Create Or Update InventoryItem. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateInventoryItem.json | -| [inventoryItemsDeleteSample.ts][inventoryitemsdeletesample] | Implements inventoryItem DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteInventoryItem.json | -| [inventoryItemsGetSample.ts][inventoryitemsgetsample] | Implements InventoryItem GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetInventoryItem.json | -| [inventoryItemsListByVCenterSample.ts][inventoryitemslistbyvcentersample] | Returns the list of inventoryItems of the given vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/InventoryItems_ListByVCenter.json | -| [machineExtensionsCreateOrUpdateSample.ts][machineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/PUTExtension.json | -| [machineExtensionsDeleteSample.ts][machineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DELETEExtension.json | -| [machineExtensionsGetSample.ts][machineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GETExtension.json | -| [machineExtensionsListSample.ts][machineextensionslistsample] | The operation to get all extensions of a non-Azure machine x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/LISTExtension.json | -| [machineExtensionsUpdateSample.ts][machineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateExtension.json | -| [operationsListSample.ts][operationslistsample] | Returns list of all operations. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListOperations.json | -| [resourcePoolsCreateSample.ts][resourcepoolscreatesample] | Create Or Update resourcePool. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateResourcePool.json | -| [resourcePoolsDeleteSample.ts][resourcepoolsdeletesample] | Implements resourcePool DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteResourcePool.json | -| [resourcePoolsGetSample.ts][resourcepoolsgetsample] | Implements resourcePool GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetResourcePool.json | -| [resourcePoolsListByResourceGroupSample.ts][resourcepoolslistbyresourcegroupsample] | List of resourcePools in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePoolsByResourceGroup.json | -| [resourcePoolsListSample.ts][resourcepoolslistsample] | List of resourcePools in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePools.json | -| [resourcePoolsUpdateSample.ts][resourcepoolsupdatesample] | API to update certain properties of the resourcePool resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateResourcePool.json | -| [vCentersCreateSample.ts][vcenterscreatesample] | Create Or Update vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVCenter.json | -| [vCentersDeleteSample.ts][vcentersdeletesample] | Implements vCenter DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVCenter.json | -| [vCentersGetSample.ts][vcentersgetsample] | Implements vCenter GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVCenter.json | -| [vCentersListByResourceGroupSample.ts][vcenterslistbyresourcegroupsample] | List of vCenters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCentersByResourceGroup.json | -| [vCentersListSample.ts][vcenterslistsample] | List of vCenters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCenters.json | -| [vCentersUpdateSample.ts][vcentersupdatesample] | API to update certain properties of the vCenter resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVCenter.json | -| [virtualMachineTemplatesCreateSample.ts][virtualmachinetemplatescreatesample] | Create Or Update virtual machine template. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachineTemplate.json | -| [virtualMachineTemplatesDeleteSample.ts][virtualmachinetemplatesdeletesample] | Implements virtual machine template DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachineTemplate.json | -| [virtualMachineTemplatesGetSample.ts][virtualmachinetemplatesgetsample] | Implements virtual machine template GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachineTemplate.json | -| [virtualMachineTemplatesListByResourceGroupSample.ts][virtualmachinetemplateslistbyresourcegroupsample] | List of virtualMachineTemplates in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json | -| [virtualMachineTemplatesListSample.ts][virtualmachinetemplateslistsample] | List of virtualMachineTemplates in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplates.json | -| [virtualMachineTemplatesUpdateSample.ts][virtualmachinetemplatesupdatesample] | API to update certain properties of the virtual machine template resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachineTemplate.json | -| [virtualMachinesAssessPatchesSample.ts][virtualmachinesassesspatchessample] | The operation to assess patches on a vSphere VMware machine identity in Azure. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineAssessPatches.json | -| [virtualMachinesCreateSample.ts][virtualmachinescreatesample] | Create Or Update virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachine.json | -| [virtualMachinesDeleteSample.ts][virtualmachinesdeletesample] | Implements virtual machine DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachine.json | -| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | Implements virtual machine GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachine.json | -| [virtualMachinesInstallPatchesSample.ts][virtualmachinesinstallpatchessample] | The operation to install patches on a vSphere VMware machine identity in Azure. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineInstallPatches.json | -| [virtualMachinesListByResourceGroupSample.ts][virtualmachineslistbyresourcegroupsample] | List of virtualMachines in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachinesByResourceGroup.json | -| [virtualMachinesListSample.ts][virtualmachineslistsample] | List of virtualMachines in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachines.json | -| [virtualMachinesRestartSample.ts][virtualmachinesrestartsample] | Restart virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/RestartVirtualMachine.json | -| [virtualMachinesStartSample.ts][virtualmachinesstartsample] | Start virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StartVirtualMachine.json | -| [virtualMachinesStopSample.ts][virtualmachinesstopsample] | Stop virtual machine. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StopVirtualMachine.json | -| [virtualMachinesUpdateSample.ts][virtualmachinesupdatesample] | API to update certain properties of the virtual machine resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachine.json | -| [virtualNetworksCreateSample.ts][virtualnetworkscreatesample] | Create Or Update virtual network. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualNetwork.json | -| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Implements virtual network DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualNetwork.json | -| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Implements virtual network GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualNetwork.json | -| [virtualNetworksListByResourceGroupSample.ts][virtualnetworkslistbyresourcegroupsample] | List of virtualNetworks in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworksByResourceGroup.json | -| [virtualNetworksListSample.ts][virtualnetworkslistsample] | List of virtualNetworks in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworks.json | -| [virtualNetworksUpdateSample.ts][virtualnetworksupdatesample] | API to update certain properties of the virtual network resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualNetwork.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/clustersCreateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env CONNECTEDVMWARE_SUBSCRIPTION_ID="" CONNECTEDVMWARE_RESOURCE_GROUP="" node dist/clustersCreateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[clusterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersCreateSample.ts -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersDeleteSample.ts -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersGetSample.ts -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts -[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListSample.ts -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersUpdateSample.ts -[datastorescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresCreateSample.ts -[datastoresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresDeleteSample.ts -[datastoresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresGetSample.ts -[datastoreslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListByResourceGroupSample.ts -[datastoreslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListSample.ts -[datastoresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresUpdateSample.ts -[guestagentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsCreateSample.ts -[guestagentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsDeleteSample.ts -[guestagentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsGetSample.ts -[guestagentslistbyvmsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsListByVMSample.ts -[hostscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsCreateSample.ts -[hostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsDeleteSample.ts -[hostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsGetSample.ts -[hostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListByResourceGroupSample.ts -[hostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListSample.ts -[hostsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsUpdateSample.ts -[hybrididentitymetadatacreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataCreateSample.ts -[hybrididentitymetadatadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts -[hybrididentitymetadatagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataGetSample.ts -[hybrididentitymetadatalistbyvmsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataListByVMSample.ts -[inventoryitemscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsCreateSample.ts -[inventoryitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsDeleteSample.ts -[inventoryitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsGetSample.ts -[inventoryitemslistbyvcentersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsListByVCenterSample.ts -[machineextensionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts -[machineextensionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsDeleteSample.ts -[machineextensionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsGetSample.ts -[machineextensionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsListSample.ts -[machineextensionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/operationsListSample.ts -[resourcepoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsCreateSample.ts -[resourcepoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsDeleteSample.ts -[resourcepoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsGetSample.ts -[resourcepoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListByResourceGroupSample.ts -[resourcepoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListSample.ts -[resourcepoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsUpdateSample.ts -[vcenterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersCreateSample.ts -[vcentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersDeleteSample.ts -[vcentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersGetSample.ts -[vcenterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListByResourceGroupSample.ts -[vcenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListSample.ts -[vcentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersUpdateSample.ts -[virtualmachinetemplatescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesCreateSample.ts -[virtualmachinetemplatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesDeleteSample.ts -[virtualmachinetemplatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesGetSample.ts -[virtualmachinetemplateslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts -[virtualmachinetemplateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListSample.ts -[virtualmachinetemplatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesUpdateSample.ts -[virtualmachinesassesspatchessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesAssessPatchesSample.ts -[virtualmachinescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesCreateSample.ts -[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesDeleteSample.ts -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesGetSample.ts -[virtualmachinesinstallpatchessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesInstallPatchesSample.ts -[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts -[virtualmachineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListSample.ts -[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesRestartSample.ts -[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStartSample.ts -[virtualmachinesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStopSample.ts -[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesUpdateSample.ts -[virtualnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksCreateSample.ts -[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts -[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksGetSample.ts -[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts -[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListSample.ts -[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataCreateSample.ts deleted file mode 100644 index c66c27f8a372..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataCreateSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HybridIdentityMetadata, - HybridIdentityMetadataCreateOptionalParams, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create Or Update HybridIdentityMetadata. - * - * @summary Create Or Update HybridIdentityMetadata. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHybridIdentityMetadata.json - */ -async function createHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; - const body: HybridIdentityMetadata = { - publicKey: "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2", - vmId: "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c" - }; - const options: HybridIdentityMetadataCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.hybridIdentityMetadataOperations.create( - resourceGroupName, - virtualMachineName, - metadataName, - options - ); - console.log(result); -} - -async function main() { - createHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts deleted file mode 100644 index 4e8cdf530bcd..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataDeleteSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Implements HybridIdentityMetadata DELETE method. - * - * @summary Implements HybridIdentityMetadata DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHybridIdentityMetadata.json - */ -async function deleteHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.hybridIdentityMetadataOperations.delete( - resourceGroupName, - virtualMachineName, - metadataName - ); - console.log(result); -} - -async function main() { - deleteHybridIdentityMetadata(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts deleted file mode 100644 index 5493b2d8398d..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MachineExtension, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to create or update the extension. - * - * @summary The operation to create or update the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/PUTExtension.json - */ -async function createOrUpdateAMachineExtensionPut() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const extensionParameters: MachineExtension = { - typePropertiesType: "CustomScriptExtension", - location: "eastus2euap", - publisher: "Microsoft.Compute", - settings: { - commandToExecute: - 'powershell.exe -c "Get-Process | Where-Object { $_.CPU -gt 10000 }"' - }, - typeHandlerVersion: "1.10" - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - extensionName, - extensionParameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAMachineExtensionPut(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsDeleteSample.ts deleted file mode 100644 index 4b3ef5c41c62..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsDeleteSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to delete the extension. - * - * @summary The operation to delete the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DELETEExtension.json - */ -async function deleteAMachineExtension() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "MMA"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.beginDeleteAndWait( - resourceGroupName, - name, - extensionName - ); - console.log(result); -} - -async function main() { - deleteAMachineExtension(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsGetSample.ts deleted file mode 100644 index dfc56e1db94c..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsGetSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to get the extension. - * - * @summary The operation to get the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GETExtension.json - */ -async function getMachineExtension() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.get( - resourceGroupName, - name, - extensionName - ); - console.log(result); -} - -async function main() { - getMachineExtension(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsListSample.ts deleted file mode 100644 index 0388acb97524..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsListSample.ts +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to get all extensions of a non-Azure machine - * - * @summary The operation to get all extensions of a non-Azure machine - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/LISTExtension.json - */ -async function getAllMachineExtensions() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.machineExtensions.list( - resourceGroupName, - name - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAllMachineExtensions(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsUpdateSample.ts deleted file mode 100644 index bf529673d172..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/machineExtensionsUpdateSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MachineExtensionUpdate, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to update the extension. - * - * @summary The operation to update the extension. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateExtension.json - */ -async function createOrUpdateAMachineExtensionPatch() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscriptionId}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroup"; - const name = "myMachine"; - const extensionName = "CustomScriptExtension"; - const extensionParameters: MachineExtensionUpdate = { - type: "CustomScriptExtension", - publisher: "Microsoft.Compute", - settings: { - commandToExecute: - 'powershell.exe -c "Get-Process | Where-Object { $_.CPU -lt 100 }"' - }, - typeHandlerVersion: "1.10" - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.machineExtensions.beginUpdateAndWait( - resourceGroupName, - name, - extensionName, - extensionParameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAMachineExtensionPatch(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesAssessPatchesSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesAssessPatchesSample.ts deleted file mode 100644 index 077529114069..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesAssessPatchesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to assess patches on a vSphere VMware machine identity in Azure. - * - * @summary The operation to assess patches on a vSphere VMware machine identity in Azure. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineAssessPatches.json - */ -async function assessPatchStateOfAMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroupName"; - const name = "myMachineName"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginAssessPatchesAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -async function main() { - assessPatchStateOfAMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesCreateSample.ts deleted file mode 100644 index f61a82f164e4..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesCreateSample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachine, - VirtualMachinesCreateOptionalParams, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create Or Update virtual machine. - * - * @summary Create Or Update virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachine.json - */ -async function createVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; - const body: VirtualMachine = { - extendedLocation: { - name: - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso", - type: "customLocation" - }, - hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, - location: "East US", - resourcePoolId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool", - templateId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate", - vCenterId: - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter" - }; - const options: VirtualMachinesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginCreateAndWait( - resourceGroupName, - virtualMachineName, - options - ); - console.log(result); -} - -async function main() { - createVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesInstallPatchesSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesInstallPatchesSample.ts deleted file mode 100644 index 015ef04aaafa..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesInstallPatchesSample.ts +++ /dev/null @@ -1,57 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineInstallPatchesParameters, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to The operation to install patches on a vSphere VMware machine identity in Azure. - * - * @summary The operation to install patches on a vSphere VMware machine identity in Azure. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineInstallPatches.json - */ -async function installPatchStateOfAMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "myResourceGroupName"; - const name = "myMachineName"; - const installPatchesInput: VirtualMachineInstallPatchesParameters = { - maximumDuration: "PT3H", - rebootSetting: "IfRequired", - windowsParameters: { - classificationsToInclude: ["Critical", "Security"], - maxPatchPublishDate: new Date("2022-01-15T02:36:43.0539904+00:00") - } - }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginInstallPatchesAndWait( - resourceGroupName, - name, - installPatchesInput - ); - console.log(result); -} - -async function main() { - installPatchStateOfAMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts deleted file mode 100644 index 3f195723c302..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List of virtualMachines in a resource group. - * - * @summary List of virtualMachines in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachinesByResourceGroup.json - */ -async function listVirtualMachinesByResourceGroup() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.virtualMachines.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesUpdateSample.ts deleted file mode 100644 index e39c30e76427..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesUpdateSample.ts +++ /dev/null @@ -1,55 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineUpdate, - VirtualMachinesUpdateOptionalParams, - AzureArcVMwareManagementServiceAPI -} from "@azure/arm-connectedvmware"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to API to update certain properties of the virtual machine resource. - * - * @summary API to update certain properties of the virtual machine resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachine.json - */ -async function updateVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; - const body: VirtualMachineUpdate = { - tags: { tag1: "value1", tag2: "value2" } - }; - const options: VirtualMachinesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options - ); - console.log(result); -} - -async function main() { - updateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/README.md b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/README.md new file mode 100644 index 000000000000..c014c1f698a1 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/README.md @@ -0,0 +1,170 @@ +# client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [clustersCreateSample.js][clusterscreatesample] | Create Or Update cluster. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateCluster.json | +| [clustersDeleteSample.js][clustersdeletesample] | Implements cluster DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteCluster.json | +| [clustersGetSample.js][clustersgetsample] | Implements cluster GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetCluster.json | +| [clustersListByResourceGroupSample.js][clusterslistbyresourcegroupsample] | List of clusters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClustersByResourceGroup.json | +| [clustersListSample.js][clusterslistsample] | List of clusters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClusters.json | +| [clustersUpdateSample.js][clustersupdatesample] | API to update certain properties of the cluster resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateCluster.json | +| [datastoresCreateSample.js][datastorescreatesample] | Create Or Update datastore. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateDatastore.json | +| [datastoresDeleteSample.js][datastoresdeletesample] | Implements datastore DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteDatastore.json | +| [datastoresGetSample.js][datastoresgetsample] | Implements datastore GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetDatastore.json | +| [datastoresListByResourceGroupSample.js][datastoreslistbyresourcegroupsample] | List of datastores in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastoresByResourceGroup.json | +| [datastoresListSample.js][datastoreslistsample] | List of datastores in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastores.json | +| [datastoresUpdateSample.js][datastoresupdatesample] | API to update certain properties of the datastore resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateDatastore.json | +| [hostsCreateSample.js][hostscreatesample] | Create Or Update host. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateHost.json | +| [hostsDeleteSample.js][hostsdeletesample] | Implements host DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteHost.json | +| [hostsGetSample.js][hostsgetsample] | Implements host GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetHost.json | +| [hostsListByResourceGroupSample.js][hostslistbyresourcegroupsample] | List of hosts in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHostsByResourceGroup.json | +| [hostsListSample.js][hostslistsample] | List of hosts in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHosts.json | +| [hostsUpdateSample.js][hostsupdatesample] | API to update certain properties of the host resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateHost.json | +| [inventoryItemsCreateSample.js][inventoryitemscreatesample] | Create Or Update InventoryItem. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateInventoryItem.json | +| [inventoryItemsDeleteSample.js][inventoryitemsdeletesample] | Implements inventoryItem DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteInventoryItem.json | +| [inventoryItemsGetSample.js][inventoryitemsgetsample] | Implements InventoryItem GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetInventoryItem.json | +| [inventoryItemsListByVCenterSample.js][inventoryitemslistbyvcentersample] | Returns the list of inventoryItems of the given vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/InventoryItems_ListByVCenter.json | +| [operationsListSample.js][operationslistsample] | Returns list of all operations. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListOperations.json | +| [resourcePoolsCreateSample.js][resourcepoolscreatesample] | Create Or Update resourcePool. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateResourcePool.json | +| [resourcePoolsDeleteSample.js][resourcepoolsdeletesample] | Implements resourcePool DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteResourcePool.json | +| [resourcePoolsGetSample.js][resourcepoolsgetsample] | Implements resourcePool GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetResourcePool.json | +| [resourcePoolsListByResourceGroupSample.js][resourcepoolslistbyresourcegroupsample] | List of resourcePools in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePoolsByResourceGroup.json | +| [resourcePoolsListSample.js][resourcepoolslistsample] | List of resourcePools in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePools.json | +| [resourcePoolsUpdateSample.js][resourcepoolsupdatesample] | API to update certain properties of the resourcePool resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateResourcePool.json | +| [vCentersCreateSample.js][vcenterscreatesample] | Create Or Update vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVCenter.json | +| [vCentersDeleteSample.js][vcentersdeletesample] | Implements vCenter DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVCenter.json | +| [vCentersGetSample.js][vcentersgetsample] | Implements vCenter GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVCenter.json | +| [vCentersListByResourceGroupSample.js][vcenterslistbyresourcegroupsample] | List of vCenters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCentersByResourceGroup.json | +| [vCentersListSample.js][vcenterslistsample] | List of vCenters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCenters.json | +| [vCentersUpdateSample.js][vcentersupdatesample] | API to update certain properties of the vCenter resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVCenter.json | +| [virtualMachineInstancesCreateOrUpdateSample.js][virtualmachineinstancescreateorupdatesample] | The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineInstance.json | +| [virtualMachineInstancesDeleteSample.js][virtualmachineinstancesdeletesample] | The operation to delete a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineInstance.json | +| [virtualMachineInstancesGetSample.js][virtualmachineinstancesgetsample] | Retrieves information about a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineInstance.json | +| [virtualMachineInstancesListSample.js][virtualmachineinstanceslistsample] | Lists all of the virtual machine instances within the specified parent resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineInstances.json | +| [virtualMachineInstancesRestartSample.js][virtualmachineinstancesrestartsample] | The operation to restart a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/RestartVirtualMachineInstance.json | +| [virtualMachineInstancesStartSample.js][virtualmachineinstancesstartsample] | The operation to start a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StartVirtualMachineInstance.json | +| [virtualMachineInstancesStopSample.js][virtualmachineinstancesstopsample] | The operation to power off (stop) a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StopVirtualMachineInstance.json | +| [virtualMachineInstancesUpdateSample.js][virtualmachineinstancesupdatesample] | The operation to update a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineInstance.json | +| [virtualMachineTemplatesCreateSample.js][virtualmachinetemplatescreatesample] | Create Or Update virtual machine template. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineTemplate.json | +| [virtualMachineTemplatesDeleteSample.js][virtualmachinetemplatesdeletesample] | Implements virtual machine template DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineTemplate.json | +| [virtualMachineTemplatesGetSample.js][virtualmachinetemplatesgetsample] | Implements virtual machine template GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineTemplate.json | +| [virtualMachineTemplatesListByResourceGroupSample.js][virtualmachinetemplateslistbyresourcegroupsample] | List of virtualMachineTemplates in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplatesByResourceGroup.json | +| [virtualMachineTemplatesListSample.js][virtualmachinetemplateslistsample] | List of virtualMachineTemplates in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplates.json | +| [virtualMachineTemplatesUpdateSample.js][virtualmachinetemplatesupdatesample] | API to update certain properties of the virtual machine template resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineTemplate.json | +| [virtualNetworksCreateSample.js][virtualnetworkscreatesample] | Create Or Update virtual network. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualNetwork.json | +| [virtualNetworksDeleteSample.js][virtualnetworksdeletesample] | Implements virtual network DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualNetwork.json | +| [virtualNetworksGetSample.js][virtualnetworksgetsample] | Implements virtual network GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualNetwork.json | +| [virtualNetworksListByResourceGroupSample.js][virtualnetworkslistbyresourcegroupsample] | List of virtualNetworks in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworksByResourceGroup.json | +| [virtualNetworksListSample.js][virtualnetworkslistsample] | List of virtualNetworks in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworks.json | +| [virtualNetworksUpdateSample.js][virtualnetworksupdatesample] | API to update certain properties of the virtual network resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualNetwork.json | +| [vmInstanceGuestAgentsCreateSample.js][vminstanceguestagentscreatesample] | Create Or Update GuestAgent. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVMInstanceGuestAgent.json | +| [vmInstanceGuestAgentsDeleteSample.js][vminstanceguestagentsdeletesample] | Implements GuestAgent DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVMInstanceGuestAgent.json | +| [vmInstanceGuestAgentsGetSample.js][vminstanceguestagentsgetsample] | Implements GuestAgent GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVMInstanceGuestAgent.json | +| [vmInstanceGuestAgentsListSample.js][vminstanceguestagentslistsample] | Returns the list of GuestAgent of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/VMInstanceGuestAgent_ListByVm.json | +| [vmInstanceHybridIdentityMetadataGetSample.js][vminstancehybrididentitymetadatagetsample] | Implements HybridIdentityMetadata GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVmInstanceHybridIdentityMetadata.json | +| [vmInstanceHybridIdentityMetadataListSample.js][vminstancehybrididentitymetadatalistsample] | Returns the list of HybridIdentityMetadata of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/HybridIdentityMetadata_ListByVmInstance.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node clustersCreateSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env CONNECTEDVMWARE_SUBSCRIPTION_ID="" CONNECTEDVMWARE_RESOURCE_GROUP="" node clustersCreateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[clusterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersCreateSample.js +[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersDeleteSample.js +[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersGetSample.js +[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListByResourceGroupSample.js +[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListSample.js +[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersUpdateSample.js +[datastorescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresCreateSample.js +[datastoresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresDeleteSample.js +[datastoresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresGetSample.js +[datastoreslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListByResourceGroupSample.js +[datastoreslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListSample.js +[datastoresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresUpdateSample.js +[hostscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsCreateSample.js +[hostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsDeleteSample.js +[hostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsGetSample.js +[hostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListByResourceGroupSample.js +[hostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListSample.js +[hostsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsUpdateSample.js +[inventoryitemscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsCreateSample.js +[inventoryitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsDeleteSample.js +[inventoryitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsGetSample.js +[inventoryitemslistbyvcentersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsListByVCenterSample.js +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/operationsListSample.js +[resourcepoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsCreateSample.js +[resourcepoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsDeleteSample.js +[resourcepoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsGetSample.js +[resourcepoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListByResourceGroupSample.js +[resourcepoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListSample.js +[resourcepoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsUpdateSample.js +[vcenterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersCreateSample.js +[vcentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersDeleteSample.js +[vcentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersGetSample.js +[vcenterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListByResourceGroupSample.js +[vcenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListSample.js +[vcentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersUpdateSample.js +[virtualmachineinstancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js +[virtualmachineinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesDeleteSample.js +[virtualmachineinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesGetSample.js +[virtualmachineinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesListSample.js +[virtualmachineinstancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesRestartSample.js +[virtualmachineinstancesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStartSample.js +[virtualmachineinstancesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStopSample.js +[virtualmachineinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesUpdateSample.js +[virtualmachinetemplatescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesCreateSample.js +[virtualmachinetemplatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js +[virtualmachinetemplatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesGetSample.js +[virtualmachinetemplateslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js +[virtualmachinetemplateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListSample.js +[virtualmachinetemplatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js +[virtualnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksCreateSample.js +[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksDeleteSample.js +[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksGetSample.js +[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js +[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListSample.js +[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksUpdateSample.js +[vminstanceguestagentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsCreateSample.js +[vminstanceguestagentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsDeleteSample.js +[vminstanceguestagentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsGetSample.js +[vminstanceguestagentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsListSample.js +[vminstancehybrididentitymetadatagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataGetSample.js +[vminstancehybrididentitymetadatalistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataListSample.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware/README.md diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersCreateSample.js similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersCreateSample.js index 3544d4b3a580..7f5a2f4bcf9a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update cluster. * * @summary Create Or Update cluster. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateCluster.json */ async function createCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersDeleteSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersDeleteSample.js index 8aba16139913..803e70f78979 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements cluster DELETE method. * * @summary Implements cluster DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteCluster.json */ async function deleteCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersGetSample.js index 81c11c68168c..b60e6f55e699 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements cluster GET method. * * @summary Implements cluster GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetCluster.json */ async function getCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListByResourceGroupSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListByResourceGroupSample.js index d77f84e5e56b..7299533e2c5e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of clusters in a resource group. * * @summary List of clusters in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClustersByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClustersByResourceGroup.json */ async function listClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListSample.js index 08b030f943f2..c6746679f319 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of clusters in a subscription. * * @summary List of clusters in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClusters.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClusters.json */ async function listClusters() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersUpdateSample.js index ca1a87c48689..e77da58acdd4 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/clustersUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/clustersUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the cluster resource. * * @summary API to update certain properties of the cluster resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateCluster.json */ async function updateCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresCreateSample.js similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresCreateSample.js index 7b10defbaac6..4f192f234cb6 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update datastore. * * @summary Create Or Update datastore. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateDatastore.json */ async function createDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresDeleteSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresDeleteSample.js index 079e84b83a98..442577cdeb1d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements datastore DELETE method. * * @summary Implements datastore DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteDatastore.json */ async function deleteDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresGetSample.js index 0a46e55d6482..138be04ef9e2 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements datastore GET method. * * @summary Implements datastore GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetDatastore.json */ async function getDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListByResourceGroupSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListByResourceGroupSample.js index 4471f76673a5..44706b6c1488 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of datastores in a resource group. * * @summary List of datastores in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastoresByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastoresByResourceGroup.json */ async function listDatastoresByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListSample.js index f38801ef5121..4bc999294410 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of datastores in a subscription. * * @summary List of datastores in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastores.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastores.json */ async function listDatastores() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresUpdateSample.js index 1de4ecd27afe..aba48732359b 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/datastoresUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/datastoresUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the datastore resource. * * @summary API to update certain properties of the datastore resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateDatastore.json */ async function updateDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsCreateSample.js similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsCreateSample.js index 74e97e11ac5f..637bd89ed4fa 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update host. * * @summary Create Or Update host. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateHost.json */ async function createHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsDeleteSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsDeleteSample.js index fbb241ae99ba..edf39405ddf4 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements host DELETE method. * * @summary Implements host DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteHost.json */ async function deleteHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsGetSample.js index 7e089f7341ca..cc215dcf5987 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements host GET method. * * @summary Implements host GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetHost.json */ async function getHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListByResourceGroupSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListByResourceGroupSample.js index da0f58a99785..610a4a26f02f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of hosts in a resource group. * * @summary List of hosts in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHostsByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHostsByResourceGroup.json */ async function listHostsByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListSample.js index 5c8814f2f9fb..cc830f2c4616 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of hosts in a subscription. * * @summary List of hosts in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHosts.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHosts.json */ async function listHosts() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsUpdateSample.js index a6d90294791a..2300d9cd91aa 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hostsUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/hostsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the host resource. * * @summary API to update certain properties of the host resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateHost.json */ async function updateHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsCreateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsCreateSample.js index 3076388f48d3..ecfc3a178f6a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update InventoryItem. * * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateInventoryItem.json */ async function createInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsDeleteSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsDeleteSample.js index caf3dc8fc61e..b2f5bfba496d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements inventoryItem DELETE method. * * @summary Implements inventoryItem DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteInventoryItem.json */ async function deleteInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsGetSample.js index f9a5a8cbe662..05c32a62af55 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements InventoryItem GET method. * * @summary Implements InventoryItem GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetInventoryItem.json */ async function getInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsListByVCenterSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsListByVCenterSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsListByVCenterSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsListByVCenterSample.js index 1486a9c5fce7..2a912433e880 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/inventoryItemsListByVCenterSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/inventoryItemsListByVCenterSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns the list of inventoryItems of the given vCenter. * * @summary Returns the list of inventoryItems of the given vCenter. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/InventoryItems_ListByVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/InventoryItems_ListByVCenter.json */ async function inventoryItemsListByVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/operationsListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/operationsListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/operationsListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/operationsListSample.js index b502e0fa8792..9ae0d1ed38d3 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns list of all operations. * * @summary Returns list of all operations. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListOperations.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListOperations.json */ async function listOperations() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/package.json b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/package.json similarity index 80% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/package.json rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/package.json index 5d77660f0048..bb4cfe8c76b3 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/package.json +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-connectedvmware-js-beta", + "name": "@azure-samples/arm-connectedvmware-js", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", + "description": " client library samples for JavaScript", "engines": { "node": ">=16.0.0" }, @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware", "dependencies": { - "@azure/arm-connectedvmware": "next", + "@azure/arm-connectedvmware": "latest", "dotenv": "latest", "@azure/identity": "^2.0.1" } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsCreateSample.js similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsCreateSample.js index 07480d7151c3..d9aa61d4204a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update resourcePool. * * @summary Create Or Update resourcePool. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateResourcePool.json */ async function createResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsDeleteSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsDeleteSample.js index 0f3bda90240b..7f340b2fcdd8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements resourcePool DELETE method. * * @summary Implements resourcePool DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteResourcePool.json */ async function deleteResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsGetSample.js index 6b1ea00518c4..37c559300e79 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements resourcePool GET method. * * @summary Implements resourcePool GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetResourcePool.json */ async function getResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListByResourceGroupSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListByResourceGroupSample.js index f815f6f3ad80..f1457b4ffb2e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of resourcePools in a resource group. * * @summary List of resourcePools in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePoolsByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePoolsByResourceGroup.json */ async function listResourcePoolsByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListSample.js index 42f078f3aa99..81effa3a451b 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of resourcePools in a subscription. * * @summary List of resourcePools in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePools.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePools.json */ async function listResourcePools() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsUpdateSample.js index 6947a436ff71..5824849d877f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/resourcePoolsUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/resourcePoolsUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the resourcePool resource. * * @summary API to update certain properties of the resourcePool resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateResourcePool.json */ async function updateResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/sample.env b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/sample.env similarity index 100% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/sample.env rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/sample.env diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersCreateSample.js similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersCreateSample.js index fdc27b394dbf..8fc3c3ffd6b8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update vCenter. * * @summary Create Or Update vCenter. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVCenter.json */ async function createVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersDeleteSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersDeleteSample.js index 3253e2f8c34f..b7ab92c95a1a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements vCenter DELETE method. * * @summary Implements vCenter DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVCenter.json */ async function deleteVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersGetSample.js index 5483f8c1539c..507794c88085 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements vCenter GET method. * * @summary Implements vCenter GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVCenter.json */ async function getVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListByResourceGroupSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListByResourceGroupSample.js index 915590c83a2a..cc09073f8b58 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of vCenters in a resource group. * * @summary List of vCenters in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCentersByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCentersByResourceGroup.json */ async function listVCentersByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListSample.js index 577d70aa12fd..960cf8176fcf 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of vCenters in a subscription. * * @summary List of vCenters in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCenters.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCenters.json */ async function listVCenters() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersUpdateSample.js index e413b1c5c53e..91e67676ed30 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/vCentersUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vCentersUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the vCenter resource. * * @summary API to update certain properties of the vCenter resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVCenter.json */ async function updateVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js new file mode 100644 index 000000000000..4dc6077cfe9d --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesCreateOrUpdateSample.js @@ -0,0 +1,55 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureArcVMwareManagementServiceAPI } = require("@azure/arm-connectedvmware"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. + * + * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineInstance.json + */ +async function createVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; + const body = { + extendedLocation: { + name: "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso", + type: "customLocation", + }, + hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, + infrastructureProfile: { + templateId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate", + vCenterId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter", + }, + placementProfile: { + resourcePoolId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool", + }, + }; + const options = { body }; + const credential = new DefaultAzureCredential(); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( + resourceUri, + options + ); + console.log(result); +} + +async function main() { + createVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesDeleteSample.js similarity index 57% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesDeleteSample.js index aa3ae9b256ff..4b4631eed0b8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesDeleteSample.js @@ -13,22 +13,17 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Implements virtual machine DELETE method. + * This sample demonstrates how to The operation to delete a virtual machine instance. * - * @summary Implements virtual machine DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachine.json + * @summary The operation to delete a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineInstance.json */ async function deleteVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginDeleteAndWait(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesGetSample.js similarity index 58% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesGetSample.js index 4d572d73b8d2..38ca626a835e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesGetSample.js @@ -13,19 +13,17 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Implements virtual machine GET method. + * This sample demonstrates how to Retrieves information about a virtual machine instance. * - * @summary Implements virtual machine GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachine.json + * @summary Retrieves information about a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineInstance.json */ async function getVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.get(resourceGroupName, virtualMachineName); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesListSample.js similarity index 57% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesListSample.js index ee4194333ab8..7bb03bf713c1 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesListSample.js @@ -13,25 +13,25 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to List of virtualMachines in a subscription. + * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. * - * @summary List of virtualMachines in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachines.json + * @summary Lists all of the virtual machine instances within the specified parent resource. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineInstances.json */ -async function listVirtualMachines() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; +async function getVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.virtualMachines.list()) { + for await (let item of client.virtualMachineInstances.list(resourceUri)) { resArray.push(item); } console.log(resArray); } async function main() { - listVirtualMachines(); + getVirtualMachine(); } main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesRestartSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesRestartSample.js similarity index 58% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesRestartSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesRestartSample.js index c3141021b55a..7b523de299c6 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesRestartSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesRestartSample.js @@ -13,22 +13,17 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Restart virtual machine. + * This sample demonstrates how to The operation to restart a virtual machine instance. * - * @summary Restart virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/RestartVirtualMachine.json + * @summary The operation to restart a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/RestartVirtualMachineInstance.json */ async function restartVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginRestartAndWait(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStartSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStartSample.js similarity index 58% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStartSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStartSample.js index 21da2d61f791..fa3d320c099c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStartSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStartSample.js @@ -13,22 +13,17 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Start virtual machine. + * This sample demonstrates how to The operation to start a virtual machine instance. * - * @summary Start virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StartVirtualMachine.json + * @summary The operation to start a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StartVirtualMachineInstance.json */ async function startVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginStartAndWait(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStopSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStopSample.js similarity index 60% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStopSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStopSample.js index dc7041d1ce0b..e0327ed3f8c8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesStopSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesStopSample.js @@ -13,25 +13,19 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Stop virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. * - * @summary Stop virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StopVirtualMachine.json + * @summary The operation to power off (stop) a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StopVirtualMachineInstance.json */ async function stopVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body = { skipShutdown: true }; const options = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginStopAndWait( - resourceGroupName, - virtualMachineName, - options - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginStopAndWait(resourceUri, options); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesUpdateSample.js similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesUpdateSample.js index 4e578ce7ecd8..8623b3294597 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachinesUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineInstancesUpdateSample.js @@ -13,27 +13,21 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to API to update certain properties of the virtual machine resource. + * This sample demonstrates how to The operation to update a virtual machine instance. * - * @summary API to update certain properties of the virtual machine resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachine.json + * @summary The operation to update a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineInstance.json */ async function updateVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body = { - tags: { tag1: "value1", tag2: "value2" }, + hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, }; const options = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginUpdateAndWait(resourceUri, options); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesCreateSample.js similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesCreateSample.js index 50538aad5750..1184c1eca0ff 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update virtual machine template. * * @summary Create Or Update virtual machine template. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineTemplate.json */ async function createVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js index 3af285f403d8..215ad2f79975 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements virtual machine template DELETE method. * * @summary Implements virtual machine template DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineTemplate.json */ async function deleteVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesGetSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesGetSample.js index cd93c78fed90..fdb1d4f4c188 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements virtual machine template GET method. * * @summary Implements virtual machine template GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineTemplate.json */ async function getVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js similarity index 91% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js index 8d73f4e5f8bb..f25d47ceb385 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of virtualMachineTemplates in a resource group. * * @summary List of virtualMachineTemplates in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplatesByResourceGroup.json */ async function listVirtualMachineTemplatesByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListSample.js index ecf09db2dc19..f7b5cfd2da6a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of virtualMachineTemplates in a subscription. * * @summary List of virtualMachineTemplates in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplates.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplates.json */ async function listVirtualMachineTemplates() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js index 44e45e56dd91..b2ea39edc7fd 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualMachineTemplatesUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualMachineTemplatesUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the virtual machine template resource. * * @summary API to update certain properties of the virtual machine template resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineTemplate.json */ async function updateVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksCreateSample.js similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksCreateSample.js index 0611c227fae0..ec77dc1fd293 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update virtual network. * * @summary Create Or Update virtual network. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualNetwork.json */ async function createVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksDeleteSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksDeleteSample.js index ecff37633a1a..c754e57931d5 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements virtual network DELETE method. * * @summary Implements virtual network DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualNetwork.json */ async function deleteVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksGetSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksGetSample.js index 127bb90be51f..5d6c8c6ad518 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Implements virtual network GET method. * * @summary Implements virtual network GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualNetwork.json */ async function getVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js index cc1cb0d9e77b..32f8ede62d4e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListByResourceGroupSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of virtualNetworks in a resource group. * * @summary List of virtualNetworks in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworksByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworksByResourceGroup.json */ async function listVirtualNetworksByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListSample.js similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListSample.js index a1aa41490b8a..5806e250c89f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksListSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to List of virtualNetworks in a subscription. * * @summary List of virtualNetworks in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworks.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworks.json */ async function listVirtualNetworks() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksUpdateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksUpdateSample.js similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksUpdateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksUpdateSample.js index ce51012b2032..8f527388c7e9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/virtualNetworksUpdateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/virtualNetworksUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to API to update certain properties of the virtual network resource. * * @summary API to update certain properties of the virtual network resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualNetwork.json */ async function updateVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsCreateSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsCreateSample.js similarity index 68% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsCreateSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsCreateSample.js index 867a9e3166f6..68669cf3d332 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsCreateSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsCreateSample.js @@ -16,28 +16,22 @@ require("dotenv").config(); * This sample demonstrates how to Create Or Update GuestAgent. * * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVMInstanceGuestAgent.json */ async function createGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body = { credentials: { password: "", username: "tempuser" }, httpProxyConfig: { httpsProxy: "http://192.1.2.3:8080" }, + privateLinkScopeResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName", provisioningAction: "install", }; const options = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.guestAgents.beginCreateAndWait( - resourceGroupName, - virtualMachineName, - name, - options - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.beginCreateAndWait(resourceUri, options); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsDeleteSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsDeleteSample.js similarity index 64% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsDeleteSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsDeleteSample.js index 44317985dba0..6255bd54ee27 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsDeleteSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsDeleteSample.js @@ -16,21 +16,14 @@ require("dotenv").config(); * This sample demonstrates how to Implements GuestAgent DELETE method. * * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVMInstanceGuestAgent.json */ async function deleteGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.guestAgents.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - name - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.beginDeleteAndWait(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsGetSample.js similarity index 65% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsGetSample.js index d39028a0edf5..4d65270e36fb 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsGetSample.js @@ -16,17 +16,14 @@ require("dotenv").config(); * This sample demonstrates how to Implements GuestAgent GET method. * * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVMInstanceGuestAgent.json */ async function getGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.guestAgents.get(resourceGroupName, virtualMachineName, name); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsListByVMSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsListSample.js similarity index 68% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsListByVMSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsListSample.js index 04956f525996..9ff2ec20cc13 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/guestAgentsListByVMSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceGuestAgentsListSample.js @@ -16,17 +16,15 @@ require("dotenv").config(); * This sample demonstrates how to Returns the list of GuestAgent of the given vm. * * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GuestAgent_ListByVm.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/VMInstanceGuestAgent_ListByVm.json */ async function guestAgentListByVM() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.guestAgents.listByVm(resourceGroupName, virtualMachineName)) { + for await (let item of client.vMInstanceGuestAgents.list(resourceUri)) { resArray.push(item); } console.log(resArray); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataGetSample.js similarity index 64% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataGetSample.js index a57f7700f6c4..69fd7f6922bb 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataGetSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataGetSample.js @@ -16,21 +16,14 @@ require("dotenv").config(); * This sample demonstrates how to Implements HybridIdentityMetadata GET method. * * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHybridIdentityMetadata.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVmInstanceHybridIdentityMetadata.json */ async function getHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); - const result = await client.hybridIdentityMetadataOperations.get( - resourceGroupName, - virtualMachineName, - metadataName - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vmInstanceHybridIdentityMetadataOperations.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataListByVMSample.js b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataListSample.js similarity index 67% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataListByVMSample.js rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataListSample.js index e9d5bfa51de8..ca9808925273 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/javascript/hybridIdentityMetadataListByVMSample.js +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/javascript/vmInstanceHybridIdentityMetadataListSample.js @@ -16,20 +16,15 @@ require("dotenv").config(); * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given vm. * * @summary Returns the list of HybridIdentityMetadata of the given vm. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/HybridIdentityMetadata_ListByVm.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/HybridIdentityMetadata_ListByVmInstance.json */ async function hybridIdentityMetadataListByVM() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.hybridIdentityMetadataOperations.listByVm( - resourceGroupName, - virtualMachineName - )) { + for await (let item of client.vmInstanceHybridIdentityMetadataOperations.list(resourceUri)) { resArray.push(item); } console.log(resArray); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/README.md b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/README.md new file mode 100644 index 000000000000..135e28e454fe --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/README.md @@ -0,0 +1,183 @@ +# client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [clustersCreateSample.ts][clusterscreatesample] | Create Or Update cluster. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateCluster.json | +| [clustersDeleteSample.ts][clustersdeletesample] | Implements cluster DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteCluster.json | +| [clustersGetSample.ts][clustersgetsample] | Implements cluster GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetCluster.json | +| [clustersListByResourceGroupSample.ts][clusterslistbyresourcegroupsample] | List of clusters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClustersByResourceGroup.json | +| [clustersListSample.ts][clusterslistsample] | List of clusters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClusters.json | +| [clustersUpdateSample.ts][clustersupdatesample] | API to update certain properties of the cluster resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateCluster.json | +| [datastoresCreateSample.ts][datastorescreatesample] | Create Or Update datastore. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateDatastore.json | +| [datastoresDeleteSample.ts][datastoresdeletesample] | Implements datastore DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteDatastore.json | +| [datastoresGetSample.ts][datastoresgetsample] | Implements datastore GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetDatastore.json | +| [datastoresListByResourceGroupSample.ts][datastoreslistbyresourcegroupsample] | List of datastores in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastoresByResourceGroup.json | +| [datastoresListSample.ts][datastoreslistsample] | List of datastores in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastores.json | +| [datastoresUpdateSample.ts][datastoresupdatesample] | API to update certain properties of the datastore resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateDatastore.json | +| [hostsCreateSample.ts][hostscreatesample] | Create Or Update host. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateHost.json | +| [hostsDeleteSample.ts][hostsdeletesample] | Implements host DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteHost.json | +| [hostsGetSample.ts][hostsgetsample] | Implements host GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetHost.json | +| [hostsListByResourceGroupSample.ts][hostslistbyresourcegroupsample] | List of hosts in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHostsByResourceGroup.json | +| [hostsListSample.ts][hostslistsample] | List of hosts in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHosts.json | +| [hostsUpdateSample.ts][hostsupdatesample] | API to update certain properties of the host resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateHost.json | +| [inventoryItemsCreateSample.ts][inventoryitemscreatesample] | Create Or Update InventoryItem. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateInventoryItem.json | +| [inventoryItemsDeleteSample.ts][inventoryitemsdeletesample] | Implements inventoryItem DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteInventoryItem.json | +| [inventoryItemsGetSample.ts][inventoryitemsgetsample] | Implements InventoryItem GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetInventoryItem.json | +| [inventoryItemsListByVCenterSample.ts][inventoryitemslistbyvcentersample] | Returns the list of inventoryItems of the given vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/InventoryItems_ListByVCenter.json | +| [operationsListSample.ts][operationslistsample] | Returns list of all operations. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListOperations.json | +| [resourcePoolsCreateSample.ts][resourcepoolscreatesample] | Create Or Update resourcePool. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateResourcePool.json | +| [resourcePoolsDeleteSample.ts][resourcepoolsdeletesample] | Implements resourcePool DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteResourcePool.json | +| [resourcePoolsGetSample.ts][resourcepoolsgetsample] | Implements resourcePool GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetResourcePool.json | +| [resourcePoolsListByResourceGroupSample.ts][resourcepoolslistbyresourcegroupsample] | List of resourcePools in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePoolsByResourceGroup.json | +| [resourcePoolsListSample.ts][resourcepoolslistsample] | List of resourcePools in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePools.json | +| [resourcePoolsUpdateSample.ts][resourcepoolsupdatesample] | API to update certain properties of the resourcePool resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateResourcePool.json | +| [vCentersCreateSample.ts][vcenterscreatesample] | Create Or Update vCenter. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVCenter.json | +| [vCentersDeleteSample.ts][vcentersdeletesample] | Implements vCenter DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVCenter.json | +| [vCentersGetSample.ts][vcentersgetsample] | Implements vCenter GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVCenter.json | +| [vCentersListByResourceGroupSample.ts][vcenterslistbyresourcegroupsample] | List of vCenters in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCentersByResourceGroup.json | +| [vCentersListSample.ts][vcenterslistsample] | List of vCenters in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCenters.json | +| [vCentersUpdateSample.ts][vcentersupdatesample] | API to update certain properties of the vCenter resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVCenter.json | +| [virtualMachineInstancesCreateOrUpdateSample.ts][virtualmachineinstancescreateorupdatesample] | The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineInstance.json | +| [virtualMachineInstancesDeleteSample.ts][virtualmachineinstancesdeletesample] | The operation to delete a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineInstance.json | +| [virtualMachineInstancesGetSample.ts][virtualmachineinstancesgetsample] | Retrieves information about a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineInstance.json | +| [virtualMachineInstancesListSample.ts][virtualmachineinstanceslistsample] | Lists all of the virtual machine instances within the specified parent resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineInstances.json | +| [virtualMachineInstancesRestartSample.ts][virtualmachineinstancesrestartsample] | The operation to restart a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/RestartVirtualMachineInstance.json | +| [virtualMachineInstancesStartSample.ts][virtualmachineinstancesstartsample] | The operation to start a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StartVirtualMachineInstance.json | +| [virtualMachineInstancesStopSample.ts][virtualmachineinstancesstopsample] | The operation to power off (stop) a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StopVirtualMachineInstance.json | +| [virtualMachineInstancesUpdateSample.ts][virtualmachineinstancesupdatesample] | The operation to update a virtual machine instance. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineInstance.json | +| [virtualMachineTemplatesCreateSample.ts][virtualmachinetemplatescreatesample] | Create Or Update virtual machine template. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineTemplate.json | +| [virtualMachineTemplatesDeleteSample.ts][virtualmachinetemplatesdeletesample] | Implements virtual machine template DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineTemplate.json | +| [virtualMachineTemplatesGetSample.ts][virtualmachinetemplatesgetsample] | Implements virtual machine template GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineTemplate.json | +| [virtualMachineTemplatesListByResourceGroupSample.ts][virtualmachinetemplateslistbyresourcegroupsample] | List of virtualMachineTemplates in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplatesByResourceGroup.json | +| [virtualMachineTemplatesListSample.ts][virtualmachinetemplateslistsample] | List of virtualMachineTemplates in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplates.json | +| [virtualMachineTemplatesUpdateSample.ts][virtualmachinetemplatesupdatesample] | API to update certain properties of the virtual machine template resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineTemplate.json | +| [virtualNetworksCreateSample.ts][virtualnetworkscreatesample] | Create Or Update virtual network. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualNetwork.json | +| [virtualNetworksDeleteSample.ts][virtualnetworksdeletesample] | Implements virtual network DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualNetwork.json | +| [virtualNetworksGetSample.ts][virtualnetworksgetsample] | Implements virtual network GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualNetwork.json | +| [virtualNetworksListByResourceGroupSample.ts][virtualnetworkslistbyresourcegroupsample] | List of virtualNetworks in a resource group. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworksByResourceGroup.json | +| [virtualNetworksListSample.ts][virtualnetworkslistsample] | List of virtualNetworks in a subscription. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworks.json | +| [virtualNetworksUpdateSample.ts][virtualnetworksupdatesample] | API to update certain properties of the virtual network resource. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualNetwork.json | +| [vmInstanceGuestAgentsCreateSample.ts][vminstanceguestagentscreatesample] | Create Or Update GuestAgent. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVMInstanceGuestAgent.json | +| [vmInstanceGuestAgentsDeleteSample.ts][vminstanceguestagentsdeletesample] | Implements GuestAgent DELETE method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVMInstanceGuestAgent.json | +| [vmInstanceGuestAgentsGetSample.ts][vminstanceguestagentsgetsample] | Implements GuestAgent GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVMInstanceGuestAgent.json | +| [vmInstanceGuestAgentsListSample.ts][vminstanceguestagentslistsample] | Returns the list of GuestAgent of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/VMInstanceGuestAgent_ListByVm.json | +| [vmInstanceHybridIdentityMetadataGetSample.ts][vminstancehybrididentitymetadatagetsample] | Implements HybridIdentityMetadata GET method. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVmInstanceHybridIdentityMetadata.json | +| [vmInstanceHybridIdentityMetadataListSample.ts][vminstancehybrididentitymetadatalistsample] | Returns the list of HybridIdentityMetadata of the given vm. x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/HybridIdentityMetadata_ListByVmInstance.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/clustersCreateSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env CONNECTEDVMWARE_SUBSCRIPTION_ID="" CONNECTEDVMWARE_RESOURCE_GROUP="" node dist/clustersCreateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[clusterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersCreateSample.ts +[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersDeleteSample.ts +[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersGetSample.ts +[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListByResourceGroupSample.ts +[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListSample.ts +[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersUpdateSample.ts +[datastorescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresCreateSample.ts +[datastoresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresDeleteSample.ts +[datastoresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresGetSample.ts +[datastoreslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListByResourceGroupSample.ts +[datastoreslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListSample.ts +[datastoresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresUpdateSample.ts +[hostscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsCreateSample.ts +[hostsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsDeleteSample.ts +[hostsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsGetSample.ts +[hostslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListByResourceGroupSample.ts +[hostslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListSample.ts +[hostsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsUpdateSample.ts +[inventoryitemscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsCreateSample.ts +[inventoryitemsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsDeleteSample.ts +[inventoryitemsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsGetSample.ts +[inventoryitemslistbyvcentersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsListByVCenterSample.ts +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/operationsListSample.ts +[resourcepoolscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsCreateSample.ts +[resourcepoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsDeleteSample.ts +[resourcepoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsGetSample.ts +[resourcepoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListByResourceGroupSample.ts +[resourcepoolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListSample.ts +[resourcepoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsUpdateSample.ts +[vcenterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersCreateSample.ts +[vcentersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersDeleteSample.ts +[vcentersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersGetSample.ts +[vcenterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListByResourceGroupSample.ts +[vcenterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListSample.ts +[vcentersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersUpdateSample.ts +[virtualmachineinstancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts +[virtualmachineinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts +[virtualmachineinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts +[virtualmachineinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesListSample.ts +[virtualmachineinstancesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts +[virtualmachineinstancesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts +[virtualmachineinstancesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts +[virtualmachineinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts +[virtualmachinetemplatescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesCreateSample.ts +[virtualmachinetemplatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts +[virtualmachinetemplatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts +[virtualmachinetemplateslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts +[virtualmachinetemplateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListSample.ts +[virtualmachinetemplatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts +[virtualnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksCreateSample.ts +[virtualnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksDeleteSample.ts +[virtualnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksGetSample.ts +[virtualnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts +[virtualnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListSample.ts +[virtualnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksUpdateSample.ts +[vminstanceguestagentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsCreateSample.ts +[vminstanceguestagentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsDeleteSample.ts +[vminstanceguestagentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsGetSample.ts +[vminstanceguestagentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsListSample.ts +[vminstancehybrididentitymetadatagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataGetSample.ts +[vminstancehybrididentitymetadatalistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataListSample.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-connectedvmware?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/package.json b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json similarity index 83% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/package.json rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json index 81d1c59c439e..ec00923f0711 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/package.json +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-connectedvmware-ts-beta", + "name": "@azure-samples/arm-connectedvmware-ts", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", + "description": " client library samples for TypeScript", "engines": { "node": ">=16.0.0" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedvmware/arm-connectedvmware", "dependencies": { - "@azure/arm-connectedvmware": "next", + "@azure/arm-connectedvmware": "latest", "dotenv": "latest", "@azure/identity": "^2.0.1" }, diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/sample.env b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/sample.env similarity index 100% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/sample.env rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/sample.env diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersCreateSample.ts index f06c50ebb696..7d54e418bd99 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update cluster. * * @summary Create Or Update cluster. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateCluster.json */ async function createCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersDeleteSample.ts index 88bf5233f3b9..8b8613bba167 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements cluster DELETE method. * * @summary Implements cluster DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteCluster.json */ async function deleteCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersGetSample.ts index e01ac4fc65cf..6625f471f89a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements cluster GET method. * * @summary Implements cluster GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetCluster.json */ async function getCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListByResourceGroupSample.ts index 021ced1f4183..90571c33fa08 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of clusters in a resource group. * * @summary List of clusters in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClustersByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClustersByResourceGroup.json */ async function listClustersByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListSample.ts index 0a74a9c448e2..08adf40adfc7 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of clusters in a subscription. * * @summary List of clusters in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClusters.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClusters.json */ async function listClusters() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersUpdateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersUpdateSample.ts index 4bc375866e8c..7a08578af15d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/clustersUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/clustersUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the cluster resource. * * @summary API to update certain properties of the cluster resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateCluster.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateCluster.json */ async function updateCluster() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresCreateSample.ts index 50f589a6cba1..48805bf36684 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update datastore. * * @summary Create Or Update datastore. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateDatastore.json */ async function createDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresDeleteSample.ts index 9df61f1fa600..2e0018e3873b 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements datastore DELETE method. * * @summary Implements datastore DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteDatastore.json */ async function deleteDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresGetSample.ts index a8107f4dd3c2..5f5c1e314a0d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements datastore GET method. * * @summary Implements datastore GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetDatastore.json */ async function getDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListByResourceGroupSample.ts index 4a3ac12fc60a..921db69afee0 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of datastores in a resource group. * * @summary List of datastores in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastoresByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastoresByResourceGroup.json */ async function listDatastoresByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListSample.ts index be0a68c698d7..7d9c9a11ee40 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of datastores in a subscription. * * @summary List of datastores in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastores.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastores.json */ async function listDatastores() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresUpdateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresUpdateSample.ts index 3b5233f4bb8d..a19efbd97d4c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/datastoresUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/datastoresUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the datastore resource. * * @summary API to update certain properties of the datastore resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateDatastore.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateDatastore.json */ async function updateDatastore() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsCreateSample.ts index f0d6ce626f34..01744507c615 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update host. * * @summary Create Or Update host. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateHost.json */ async function createHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsDeleteSample.ts index 52f6ac3e8eba..0fd0a01f64dd 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements host DELETE method. * * @summary Implements host DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteHost.json */ async function deleteHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsGetSample.ts index 74f9cf38f21f..e8457646386c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements host GET method. * * @summary Implements host GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetHost.json */ async function getHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListByResourceGroupSample.ts index 65e79fdd2d41..094414f829b2 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of hosts in a resource group. * * @summary List of hosts in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHostsByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHostsByResourceGroup.json */ async function listHostsByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListSample.ts index 0a85ad57f9ce..e1deb580fbc9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of hosts in a subscription. * * @summary List of hosts in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHosts.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHosts.json */ async function listHosts() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsUpdateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsUpdateSample.ts index dbee575ba11b..b2b5d5a7e825 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hostsUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/hostsUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the host resource. * * @summary API to update certain properties of the host resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateHost.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateHost.json */ async function updateHost() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsCreateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsCreateSample.ts index bbf53f9ef289..49a901eb2375 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update InventoryItem. * * @summary Create Or Update InventoryItem. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateInventoryItem.json */ async function createInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsDeleteSample.ts index a11cf96f74ec..c236208ec395 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements inventoryItem DELETE method. * * @summary Implements inventoryItem DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteInventoryItem.json */ async function deleteInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsGetSample.ts index 937b1200fc57..5c92f96823fd 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements InventoryItem GET method. * * @summary Implements InventoryItem GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetInventoryItem.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetInventoryItem.json */ async function getInventoryItem() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsListByVCenterSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsListByVCenterSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsListByVCenterSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsListByVCenterSample.ts index 8411301c99e8..cb86e234d31d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/inventoryItemsListByVCenterSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/inventoryItemsListByVCenterSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns the list of inventoryItems of the given vCenter. * * @summary Returns the list of inventoryItems of the given vCenter. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/InventoryItems_ListByVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/InventoryItems_ListByVCenter.json */ async function inventoryItemsListByVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/operationsListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/operationsListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/operationsListSample.ts index 716b6d06c15d..f4ea3ebf550a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns list of all operations. * * @summary Returns list of all operations. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListOperations.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListOperations.json */ async function listOperations() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsCreateSample.ts index d858038376b0..c6c402689d3f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update resourcePool. * * @summary Create Or Update resourcePool. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateResourcePool.json */ async function createResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsDeleteSample.ts index 9d24402e4474..fdb8328fef65 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements resourcePool DELETE method. * * @summary Implements resourcePool DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteResourcePool.json */ async function deleteResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsGetSample.ts index b4bd9030a0f3..38066b3e7947 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements resourcePool GET method. * * @summary Implements resourcePool GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetResourcePool.json */ async function getResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListByResourceGroupSample.ts index 903511fa3de3..4fda19687310 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of resourcePools in a resource group. * * @summary List of resourcePools in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePoolsByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePoolsByResourceGroup.json */ async function listResourcePoolsByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListSample.ts index c627efba5fb6..19b190355510 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of resourcePools in a subscription. * * @summary List of resourcePools in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePools.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePools.json */ async function listResourcePools() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsUpdateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsUpdateSample.ts index 3ba3a80609cf..f09842831ba9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/resourcePoolsUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/resourcePoolsUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the resourcePool resource. * * @summary API to update certain properties of the resourcePool resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateResourcePool.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateResourcePool.json */ async function updateResourcePool() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersCreateSample.ts index 89b3b3b62aa1..6d040b8d90c4 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update vCenter. * * @summary Create Or Update vCenter. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVCenter.json */ async function createVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersDeleteSample.ts index 45abe9cd8153..20f8d578f256 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements vCenter DELETE method. * * @summary Implements vCenter DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVCenter.json */ async function deleteVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersGetSample.ts index d03483c7edea..97754b1bb479 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements vCenter GET method. * * @summary Implements vCenter GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVCenter.json */ async function getVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListByResourceGroupSample.ts index 4f0f5608595f..140b36de240d 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of vCenters in a resource group. * * @summary List of vCenters in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCentersByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCentersByResourceGroup.json */ async function listVCentersByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListSample.ts index f6e4d7c64421..0471ba857b5e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of vCenters in a subscription. * * @summary List of vCenters in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCenters.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCenters.json */ async function listVCenters() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersUpdateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersUpdateSample.ts index d076716ecd2a..0ff11a6c84c0 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/vCentersUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vCentersUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the vCenter resource. * * @summary API to update certain properties of the vCenter resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVCenter.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVCenter.json */ async function updateVCenter() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..4e3e6ee6000b --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesCreateOrUpdateSample.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + VirtualMachineInstance, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + AzureArcVMwareManagementServiceAPI +} from "@azure/arm-connectedvmware"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. + * + * @summary The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineInstance.json + */ +async function createVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; + const body: VirtualMachineInstance = { + extendedLocation: { + name: + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso", + type: "customLocation" + }, + hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 }, + infrastructureProfile: { + templateId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate", + vCenterId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter" + }, + placementProfile: { + resourcePoolId: + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool" + } + }; + const options: VirtualMachineInstancesCreateOrUpdateOptionalParams = { body }; + const credential = new DefaultAzureCredential(); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginCreateOrUpdateAndWait( + resourceUri, + options + ); + console.log(result); +} + +async function main() { + createVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts similarity index 52% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts index 302b90d33fc9..fd38523e49ca 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesDeleteSample.ts @@ -15,26 +15,18 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Implements virtual machine DELETE method. + * This sample demonstrates how to The operation to delete a virtual machine instance. * - * @summary Implements virtual machine DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachine.json + * @summary The operation to delete a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineInstance.json */ async function deleteVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginDeleteAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts similarity index 53% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts index 18e1532694b6..eec41383a3bf 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesGetSample.ts @@ -15,27 +15,17 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Implements virtual machine GET method. + * This sample demonstrates how to Retrieves information about a virtual machine instance. * - * @summary Implements virtual machine GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachine.json + * @summary Retrieves information about a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineInstance.json */ async function getVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.get( - resourceGroupName, - virtualMachineName - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesListSample.ts similarity index 53% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesListSample.ts index 43c525653fe8..d74c0010c543 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesListSample.ts @@ -15,29 +15,25 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to List of virtualMachines in a subscription. + * This sample demonstrates how to Lists all of the virtual machine instances within the specified parent resource. * - * @summary List of virtualMachines in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachines.json + * @summary Lists all of the virtual machine instances within the specified parent resource. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineInstances.json */ -async function listVirtualMachines() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; +async function getVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.virtualMachines.list()) { + for await (let item of client.virtualMachineInstances.list(resourceUri)) { resArray.push(item); } console.log(resArray); } async function main() { - listVirtualMachines(); + getVirtualMachine(); } main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesRestartSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesRestartSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts index 7f1988dacbd3..5aea7eabd0c8 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesRestartSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesRestartSample.ts @@ -15,26 +15,18 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Restart virtual machine. + * This sample demonstrates how to The operation to restart a virtual machine instance. * - * @summary Restart virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/RestartVirtualMachine.json + * @summary The operation to restart a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/RestartVirtualMachineInstance.json */ async function restartVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginRestartAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStartSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStartSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts index dea89cd0b0b6..770abf329aaf 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachinesStartSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStartSample.ts @@ -15,26 +15,18 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Start virtual machine. + * This sample demonstrates how to The operation to start a virtual machine instance. * - * @summary Start virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StartVirtualMachine.json + * @summary The operation to start a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StartVirtualMachineInstance.json */ async function startVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginStartAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesStopSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts similarity index 54% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesStopSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts index 55a835818b77..94f663ef7131 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/virtualMachinesStopSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesStopSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { StopVirtualMachineOptions, - VirtualMachinesStopOptionalParams, + VirtualMachineInstancesStopOptionalParams, AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; import { DefaultAzureCredential } from "@azure/identity"; @@ -19,28 +19,20 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Stop virtual machine. + * This sample demonstrates how to The operation to power off (stop) a virtual machine instance. * - * @summary Stop virtual machine. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StopVirtualMachine.json + * @summary The operation to power off (stop) a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StopVirtualMachineInstance.json */ async function stopVirtualMachine() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "DemoVM"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body: StopVirtualMachineOptions = { skipShutdown: true }; - const options: VirtualMachinesStopOptionalParams = { body }; + const options: VirtualMachineInstancesStopOptionalParams = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.virtualMachines.beginStopAndWait( - resourceGroupName, - virtualMachineName, + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginStopAndWait( + resourceUri, options ); console.log(result); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts new file mode 100644 index 000000000000..82581209ec50 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineInstancesUpdateSample.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + VirtualMachineInstanceUpdate, + VirtualMachineInstancesUpdateOptionalParams, + AzureArcVMwareManagementServiceAPI +} from "@azure/arm-connectedvmware"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to update a virtual machine instance. + * + * @summary The operation to update a virtual machine instance. + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineInstance.json + */ +async function updateVirtualMachine() { + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; + const body: VirtualMachineInstanceUpdate = { + hardwareProfile: { memorySizeMB: 4196, numCPUs: 4 } + }; + const options: VirtualMachineInstancesUpdateOptionalParams = { body }; + const credential = new DefaultAzureCredential(); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.virtualMachineInstances.beginUpdateAndWait( + resourceUri, + options + ); + console.log(result); +} + +async function main() { + updateVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesCreateSample.ts index 15696ff3b74a..dcf51995e707 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update virtual machine template. * * @summary Create Or Update virtual machine template. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineTemplate.json */ async function createVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts index 869cbf928a73..08385f0f22f5 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual machine template DELETE method. * * @summary Implements virtual machine template DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineTemplate.json */ async function deleteVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts index 481b025a1ed8..41e7e0033ba5 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual machine template GET method. * * @summary Implements virtual machine template GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineTemplate.json */ async function getVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts index dd2a2cd8e742..806860319d1f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualMachineTemplates in a resource group. * * @summary List of virtualMachineTemplates in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplatesByResourceGroup.json */ async function listVirtualMachineTemplatesByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListSample.ts index 03b95df6354f..96e26d22fedb 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualMachineTemplates in a subscription. * * @summary List of virtualMachineTemplates in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplates.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplates.json */ async function listVirtualMachineTemplates() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts index 8b31a0228d05..0a1d3e161c30 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualMachineTemplatesUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualMachineTemplatesUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the virtual machine template resource. * * @summary API to update certain properties of the virtual machine template resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachineTemplate.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineTemplate.json */ async function updateVirtualMachineTemplate() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksCreateSample.ts similarity index 95% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksCreateSample.ts index 31d035bccc0c..310c98cd9d6a 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksCreateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to Create Or Update virtual network. * * @summary Create Or Update virtual network. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualNetwork.json */ async function createVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksDeleteSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksDeleteSample.ts index 153275060fa9..6b7597ae0c78 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual network DELETE method. * * @summary Implements virtual network DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualNetwork.json */ async function deleteVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksGetSample.ts similarity index 93% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksGetSample.ts index 78eb1b64bef6..99bfb9043855 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Implements virtual network GET method. * * @summary Implements virtual network GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualNetwork.json */ async function getVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts index bc14071c38c6..116a55b60d6f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListByResourceGroupSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualNetworks in a resource group. * * @summary List of virtualNetworks in a resource group. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworksByResourceGroup.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworksByResourceGroup.json */ async function listVirtualNetworksByResourceGroup() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListSample.ts similarity index 92% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListSample.ts index 9fc05d17100d..1c69756f6e5c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksListSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to List of virtualNetworks in a subscription. * * @summary List of virtualNetworks in a subscription. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworks.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworks.json */ async function listVirtualNetworks() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksUpdateSample.ts similarity index 94% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksUpdateSample.ts index 70a11c2ed78f..9897800015cb 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/virtualNetworksUpdateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/virtualNetworksUpdateSample.ts @@ -22,7 +22,7 @@ dotenv.config(); * This sample demonstrates how to API to update certain properties of the virtual network resource. * * @summary API to update certain properties of the virtual network resource. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualNetwork.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualNetwork.json */ async function updateVirtualNetwork() { const subscriptionId = diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsCreateSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsCreateSample.ts similarity index 61% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsCreateSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsCreateSample.ts index c227a903a3fb..94bfa5c2ad5c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/guestAgentsCreateSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { GuestAgent, - GuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateOptionalParams, AzureArcVMwareManagementServiceAPI } from "@azure/arm-connectedvmware"; import { DefaultAzureCredential } from "@azure/identity"; @@ -22,31 +22,23 @@ dotenv.config(); * This sample demonstrates how to Create Or Update GuestAgent. * * @summary Create Or Update GuestAgent. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVMInstanceGuestAgent.json */ async function createGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const body: GuestAgent = { credentials: { password: "", username: "tempuser" }, httpProxyConfig: { httpsProxy: "http://192.1.2.3:8080" }, + privateLinkScopeResourceId: + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName", provisioningAction: "install" }; - const options: GuestAgentsCreateOptionalParams = { body }; + const options: VMInstanceGuestAgentsCreateOptionalParams = { body }; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.guestAgents.beginCreateAndWait( - resourceGroupName, - virtualMachineName, - name, + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.beginCreateAndWait( + resourceUri, options ); console.log(result); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsDeleteSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsDeleteSample.ts similarity index 59% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsDeleteSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsDeleteSample.ts index 8780f4ed856a..0cab41af8276 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsDeleteSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsDeleteSample.ts @@ -18,25 +18,15 @@ dotenv.config(); * This sample demonstrates how to Implements GuestAgent DELETE method. * * @summary Implements GuestAgent DELETE method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVMInstanceGuestAgent.json */ async function deleteGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.guestAgents.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - name + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.beginDeleteAndWait( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsGetSample.ts similarity index 60% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsGetSample.ts index f54c634e68b0..07dfa3927799 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsGetSample.ts @@ -18,26 +18,14 @@ dotenv.config(); * This sample demonstrates how to Implements GuestAgent GET method. * * @summary Implements GuestAgent GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetGuestAgent.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVMInstanceGuestAgent.json */ async function getGuestAgent() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const name = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.guestAgents.get( - resourceGroupName, - virtualMachineName, - name - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vMInstanceGuestAgents.get(resourceUri); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsListByVMSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsListSample.ts similarity index 63% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsListByVMSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsListSample.ts index 55ba13c0b972..03b3d30dca08 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/guestAgentsListByVMSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceGuestAgentsListSample.ts @@ -18,25 +18,15 @@ dotenv.config(); * This sample demonstrates how to Returns the list of GuestAgent of the given vm. * * @summary Returns the list of GuestAgent of the given vm. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GuestAgent_ListByVm.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/VMInstanceGuestAgent_ListByVm.json */ async function guestAgentListByVM() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.guestAgents.listByVm( - resourceGroupName, - virtualMachineName - )) { + for await (let item of client.vMInstanceGuestAgents.list(resourceUri)) { resArray.push(item); } console.log(resArray); diff --git a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataGetSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataGetSample.ts similarity index 59% rename from sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataGetSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataGetSample.ts index 95a9c9e28616..6edf99a00b58 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples-dev/hybridIdentityMetadataGetSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataGetSample.ts @@ -18,25 +18,15 @@ dotenv.config(); * This sample demonstrates how to Implements HybridIdentityMetadata GET method. * * @summary Implements HybridIdentityMetadata GET method. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHybridIdentityMetadata.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVmInstanceHybridIdentityMetadata.json */ async function getHybridIdentityMetadata() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; - const metadataName = "default"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); - const result = await client.hybridIdentityMetadataOperations.get( - resourceGroupName, - virtualMachineName, - metadataName + const client = new AzureArcVMwareManagementServiceAPI(credential); + const result = await client.vmInstanceHybridIdentityMetadataOperations.get( + resourceUri ); console.log(result); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataListByVMSample.ts b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataListSample.ts similarity index 63% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataListByVMSample.ts rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataListSample.ts index f448c752ebe3..bf5fa88b1179 100644 --- a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/src/hybridIdentityMetadataListByVMSample.ts +++ b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/src/vmInstanceHybridIdentityMetadataListSample.ts @@ -18,24 +18,16 @@ dotenv.config(); * This sample demonstrates how to Returns the list of HybridIdentityMetadata of the given vm. * * @summary Returns the list of HybridIdentityMetadata of the given vm. - * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/HybridIdentityMetadata_ListByVm.json + * x-ms-original-file: specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/HybridIdentityMetadata_ListByVmInstance.json */ async function hybridIdentityMetadataListByVM() { - const subscriptionId = - process.env["CONNECTEDVMWARE_SUBSCRIPTION_ID"] || - "fd3c3665-1729-4b7b-9a38-238e83b0f98b"; - const resourceGroupName = - process.env["CONNECTEDVMWARE_RESOURCE_GROUP"] || "testrg"; - const virtualMachineName = "ContosoVm"; + const resourceUri = + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"; const credential = new DefaultAzureCredential(); - const client = new AzureArcVMwareManagementServiceAPI( - credential, - subscriptionId - ); + const client = new AzureArcVMwareManagementServiceAPI(credential); const resArray = new Array(); - for await (let item of client.hybridIdentityMetadataOperations.listByVm( - resourceGroupName, - virtualMachineName + for await (let item of client.vmInstanceHybridIdentityMetadataOperations.list( + resourceUri )) { resArray.push(item); } diff --git a/sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/tsconfig.json b/sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/tsconfig.json similarity index 100% rename from sdk/connectedvmware/arm-connectedvmware/samples/v1-beta/typescript/tsconfig.json rename to sdk/connectedvmware/arm-connectedvmware/samples/v1/typescript/tsconfig.json diff --git a/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts b/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts index 2d3aa5a1938e..ea22afe8700c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/azureArcVMwareManagementServiceAPI.ts @@ -16,7 +16,6 @@ import { import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, - VirtualMachinesImpl, ResourcePoolsImpl, ClustersImpl, HostsImpl, @@ -25,13 +24,12 @@ import { VirtualMachineTemplatesImpl, VirtualNetworksImpl, InventoryItemsImpl, - HybridIdentityMetadataOperationsImpl, - MachineExtensionsImpl, - GuestAgentsImpl + VirtualMachineInstancesImpl, + VmInstanceHybridIdentityMetadataOperationsImpl, + VMInstanceGuestAgentsImpl } from "./operations"; import { Operations, - VirtualMachines, ResourcePools, Clusters, Hosts, @@ -40,16 +38,16 @@ import { VirtualMachineTemplates, VirtualNetworks, InventoryItems, - HybridIdentityMetadataOperations, - MachineExtensions, - GuestAgents + VirtualMachineInstances, + VmInstanceHybridIdentityMetadataOperations, + VMInstanceGuestAgents } from "./operationsInterfaces"; import { AzureArcVMwareManagementServiceAPIOptionalParams } from "./models"; export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient { $host: string; apiVersion: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the AzureArcVMwareManagementServiceAPI class. @@ -61,12 +59,28 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureArcVMwareManagementServiceAPIOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: AzureArcVMwareManagementServiceAPIOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: + | AzureArcVMwareManagementServiceAPIOptionalParams + | string, + options?: AzureArcVMwareManagementServiceAPIOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -78,7 +92,7 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient credential: credentials }; - const packageDetails = `azsdk-js-arm-connectedvmware/1.0.0-beta.3`; + const packageDetails = `azsdk-js-arm-connectedvmware/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -131,9 +145,8 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-01-10-preview"; + this.apiVersion = options.apiVersion || "2023-10-01"; this.operations = new OperationsImpl(this); - this.virtualMachines = new VirtualMachinesImpl(this); this.resourcePools = new ResourcePoolsImpl(this); this.clusters = new ClustersImpl(this); this.hosts = new HostsImpl(this); @@ -142,11 +155,11 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this); this.virtualNetworks = new VirtualNetworksImpl(this); this.inventoryItems = new InventoryItemsImpl(this); - this.hybridIdentityMetadataOperations = new HybridIdentityMetadataOperationsImpl( + this.virtualMachineInstances = new VirtualMachineInstancesImpl(this); + this.vmInstanceHybridIdentityMetadataOperations = new VmInstanceHybridIdentityMetadataOperationsImpl( this ); - this.machineExtensions = new MachineExtensionsImpl(this); - this.guestAgents = new GuestAgentsImpl(this); + this.vMInstanceGuestAgents = new VMInstanceGuestAgentsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -179,7 +192,6 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient } operations: Operations; - virtualMachines: VirtualMachines; resourcePools: ResourcePools; clusters: Clusters; hosts: Hosts; @@ -188,7 +200,7 @@ export class AzureArcVMwareManagementServiceAPI extends coreClient.ServiceClient virtualMachineTemplates: VirtualMachineTemplates; virtualNetworks: VirtualNetworks; inventoryItems: InventoryItems; - hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; - machineExtensions: MachineExtensions; - guestAgents: GuestAgents; + virtualMachineInstances: VirtualMachineInstances; + vmInstanceHybridIdentityMetadataOperations: VmInstanceHybridIdentityMetadataOperations; + vMInstanceGuestAgents: VMInstanceGuestAgents; } diff --git a/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts b/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts b/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts index 13162023dc62..cc31ddf04e4f 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/models/index.ts @@ -48,256 +48,53 @@ export interface OperationDisplay { description?: string; } -/** Error response. */ +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ export interface ErrorResponse { - /** The error details. */ - error?: ErrorDefinition; + /** The error object. */ + error?: ErrorDetail; } -/** Error definition. */ -export interface ErrorDefinition { +/** The error detail. */ +export interface ErrorDetail { /** - * Service specific error code which serves as the substatus for the HTTP error code. + * The error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly code?: string; /** - * Description of the error. + * The error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly message?: string; /** - * Internal error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDefinition[]; -} - -/** Describes the properties of an AssessPatches result. */ -export interface VirtualMachineAssessPatchesResult { - /** - * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PatchOperationStatus; - /** - * The activity ID of the operation that produced this result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly assessmentActivityId?: string; - /** - * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rebootPending?: boolean; - /** Summarization of patches available for installation on the machine by classification. */ - availablePatchCountByClassification?: AvailablePatchCountByClassification; - /** - * The UTC timestamp when the operation began. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startDateTime?: Date; - /** - * The UTC timestamp when the operation finished. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModifiedDateTime?: Date; - /** - * Indicates if operation was triggered by user or by platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startedBy?: PatchOperationStartedBy; - /** - * Specifies the patch service used for the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly patchServiceUsed?: PatchServiceUsed; - /** - * The operating system type of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsTypeUM; - /** - * The errors that were encountered during execution of the operation. The details array contains the list of them. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorDetails?: ErrorDetail; -} - -/** Summarization of patches available for installation on the machine by classification. */ -export interface AvailablePatchCountByClassification { - /** - * Number of security patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly security?: number; - /** - * Number of critical patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly critical?: number; - /** - * Number of definition patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly definition?: number; - /** - * Number of update Rollup patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updateRollup?: number; - /** - * Number of feature pack patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly featurePack?: number; - /** - * Number of service pack patches available for installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly servicePack?: number; - /** - * Number of tools patches available for installation. + * The error target. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tools?: number; + readonly target?: string; /** - * Number of updates category patches available for installation. + * The error details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly updates?: number; + readonly details?: ErrorDetail[]; /** - * Number of other patches available for installation. + * The error additional info. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly other?: number; -} - -/** Error details. */ -export interface ErrorDetail { - /** The error's code. */ - code: string; - /** A human readable error message. */ - message: string; - /** Indicates which property in the request is responsible for the error. */ - target?: string; - /** Additional error details. */ - details?: ErrorDetail[]; + readonly additionalInfo?: ErrorAdditionalInfo[]; } -/** Input for InstallPatches as directly received by the API */ -export interface VirtualMachineInstallPatchesParameters { - /** Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) */ - maximumDuration: string; - /** Defines when it is acceptable to reboot a VM during a software update operation. */ - rebootSetting: VMGuestPatchRebootSetting; - /** Input for InstallPatches on a Windows VM, as directly received by the API */ - windowsParameters?: WindowsParameters; - /** Input for InstallPatches on a Linux VM, as directly received by the API */ - linuxParameters?: LinuxParameters; -} - -/** Input for InstallPatches on a Windows VM, as directly received by the API */ -export interface WindowsParameters { - /** The update classifications to select when installing patches for Windows. */ - classificationsToInclude?: VMGuestPatchClassificationWindows[]; - /** Kbs to include in the patch operation */ - kbNumbersToInclude?: string[]; - /** Kbs to exclude in the patch operation */ - kbNumbersToExclude?: string[]; - /** Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. */ - excludeKbsRequiringReboot?: boolean; - /** This is used to install patches that were published on or before this given max published date. */ - maxPatchPublishDate?: Date; -} - -/** Input for InstallPatches on a Linux VM, as directly received by the API */ -export interface LinuxParameters { - /** The update classifications to select when installing patches for Linux. */ - classificationsToInclude?: VMGuestPatchClassificationLinux[]; - /** packages to include in the patch operation. Format: packageName_packageVersion */ - packageNameMasksToInclude?: string[]; - /** packages to exclude in the patch operation. Format: packageName_packageVersion */ - packageNameMasksToExclude?: string[]; -} - -/** The result summary of an installation operation. */ -export interface VirtualMachineInstallPatchesResult { - /** - * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PatchOperationStatus; - /** - * The activity ID of the operation that produced this result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly installationActivityId?: string; - /** - * The reboot state of the VM following completion of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rebootStatus?: VMGuestPatchRebootStatus; - /** - * Whether the operation ran out of time before it completed all its intended actions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maintenanceWindowExceeded?: boolean; - /** - * The number of patches that were not installed due to the user blocking their installation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly excludedPatchCount?: number; - /** - * The number of patches that were detected as available for install, but did not meet the operation's criteria. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly notSelectedPatchCount?: number; - /** - * The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pendingPatchCount?: number; - /** - * The number of patches successfully installed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly installedPatchCount?: number; - /** - * The number of patches that could not be installed due to some issue. See errors for details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly failedPatchCount?: number; - /** - * The UTC timestamp when the operation began. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startDateTime?: Date; - /** - * The UTC timestamp when the operation finished. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModifiedDateTime?: Date; - /** - * Indicates if operation was triggered by user or by platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startedBy?: PatchOperationStartedBy; - /** - * Specifies the patch service used for the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly patchServiceUsed?: PatchServiceUsed; +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { /** - * The operating system type of the machine. + * The additional info type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osType?: OsTypeUM; + readonly type?: string; /** - * The errors that were encountered during execution of the operation. The details array contains the list of them. + * The additional info. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: ErrorDetail; + readonly info?: Record; } /** Define the resourcePool. */ @@ -382,21 +179,51 @@ export interface ResourcePool { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly memLimitMB?: number; + /** + * Gets the used physical memory on the pool in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memOverallUsageGB?: number; + /** + * Gets the total amount of physical memory on the pool in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memCapacityGB?: number; + /** + * Gets the used CPU usage across all cores on the pool in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuOverallUsageMHz?: number; + /** + * Gets the max CPU usage across all cores on the pool in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuCapacityMHz?: number; /** * Gets the name of the corresponding resource in Kubernetes. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly customResourceName?: string; + /** + * Gets the datastore ARM ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly datastoreIds?: string[]; + /** + * Gets the network ARM ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkIds?: string[]; /** * The resource status information. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** The resource status information. */ @@ -528,20 +355,40 @@ export interface Cluster { */ readonly customResourceName?: string; /** - * Gets or sets the datastore ARM ids. + * Gets the used physical memory on the cluster in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usedMemoryGB?: number; + /** + * Gets the total amount of physical memory on the cluster in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalMemoryGB?: number; + /** + * Gets the used CPU usage across all cores on the cluster in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usedCpuMHz?: number; + /** + * Gets the max CPU usage across all cores on the cluster in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCpuMHz?: number; + /** + * Gets the datastore ARM ids. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly datastoreIds?: string[]; /** - * Gets or sets the network ARM ids. + * Gets the network ARM ids. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly networkIds?: string[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** List of Clusters. */ @@ -609,10 +456,40 @@ export interface Host { */ readonly customResourceName?: string; /** - * Gets or sets the provisioning state. + * Gets the used physical memory on the host in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly overallMemoryUsageGB?: number; + /** + * Gets the total amount of physical memory on the host in GB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memorySizeGB?: number; + /** + * Gets the used CPU usage across all cores in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly overallCpuUsageMHz?: number; + /** + * Gets the max CPU usage across all cores in MHz. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuMhz?: number; + /** + * Gets the datastore ARM ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly datastoreIds?: string[]; + /** + * Gets the network ARM ids. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly networkIds?: string[]; + /** + * Gets the provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; } /** List of Hosts. */ @@ -679,6 +556,16 @@ export interface Datastore { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly customResourceName?: string; + /** + * Gets or sets Maximum capacity of this datastore in GBs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityGB?: number; + /** + * Gets or sets Available space of this datastore in GBs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly freeSpaceGB?: number; /** * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -761,10 +648,10 @@ export interface VCenter { */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** Username / Password Credentials to connect to vcenter. */ @@ -783,8 +670,8 @@ export interface VCentersList { value: VCenter[]; } -/** Define the virtualMachine. */ -export interface VirtualMachine { +/** Define the virtualMachineTemplate. */ +export interface VirtualMachineTemplate { /** Gets or sets the location. */ location: string; /** Gets or sets the extended location. */ @@ -813,186 +700,96 @@ export interface VirtualMachine { readonly type?: string; /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ kind?: string; - /** The identity of the resource. */ - identity?: Identity; /** - * Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will - * deploy. + * Gets or sets a unique identifier for this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resourcePoolId?: string; - /** Gets or sets the ARM Id of the template resource to deploy the virtual machine. */ - templateId?: string; - /** Gets or sets the ARM Id of the vCenter resource in which this resource pool resides. */ + readonly uuid?: string; + /** Gets or sets the ARM Id of the vCenter resource in which this template resides. */ vCenterId?: string; - /** Placement properties. */ - placementProfile?: PlacementProfile; - /** OS properties. */ - osProfile?: OsProfile; - /** Hardware properties. */ - hardwareProfile?: HardwareProfile; - /** Network properties. */ - networkProfile?: NetworkProfile; - /** Storage properties. */ - storageProfile?: StorageProfile; - /** Guest agent status properties. */ - guestAgentProfile?: GuestAgentProfile; - /** Gets the security profile. */ - securityProfile?: SecurityProfile; - /** Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. */ + /** + * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine + * template. + */ moRefId?: string; - /** Gets or sets the inventory Item ID for the virtual machine. */ + /** Gets or sets the inventory Item ID for the virtual machine template. */ inventoryItemId?: string; /** - * Gets or sets the vCenter Managed Object name for the virtual machine. + * Gets or sets the vCenter Managed Object name for the virtual machine template. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly moName?: string; /** - * Gets or sets the folder path of the vm. + * Gets or sets memory size in MBs for the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly folderPath?: string; + readonly memorySizeMB?: number; /** - * Gets or sets the instance uuid of the vm. + * Gets or sets the number of vCPUs for the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceUuid?: string; - /** Gets or sets the SMBIOS UUID of the vm. */ - smbiosUuid?: string; - /** Firmware type */ - firmwareType?: FirmwareType; + readonly numCPUs?: number; /** - * Gets the power state of the virtual machine. + * Gets or sets the number of cores per socket for the template. + * Defaults to 1 if unspecified. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly powerState?: string; + readonly numCoresPerSocket?: number; /** - * Gets the name of the corresponding resource in Kubernetes. + * Gets or sets the type of the os. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customResourceName?: string; + readonly osType?: OsType; /** - * Gets or sets a unique identifier for this resource. + * Gets or sets os name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly uuid?: string; + readonly osName?: string; /** - * The resource status information. + * Gets or sets the folder path of the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly statuses?: ResourceStatus[]; + readonly folderPath?: string; /** - * Gets or sets the provisioning state. + * Gets or sets the network interfaces of the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly networkInterfaces?: NetworkInterface[]; /** - * Gets or sets a unique identifier for the vm resource. + * Gets or sets the disks the template. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmId?: string; -} - -/** Defines the resource properties. */ -export interface PlacementProfile { - /** Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. */ - resourcePoolId?: string; - /** Gets or sets the ARM Id of the cluster resource on which this virtual machine will deploy. */ - clusterId?: string; - /** Gets or sets the ARM Id of the host resource on which this virtual machine will deploy. */ - hostId?: string; - /** Gets or sets the ARM Id of the datastore resource on which the data for the virtual machine will be kept. */ - datastoreId?: string; -} - -/** Defines the resource properties. */ -export interface OsProfile { - /** Gets or sets computer name. */ - computerName?: string; - /** Gets or sets administrator username. */ - adminUsername?: string; - /** Gets or sets administrator password. */ - adminPassword?: string; - /** Gets or sets the guestId. */ - guestId?: string; + readonly disks?: VirtualDisk[]; /** - * Gets or sets a value indicating whether the VM is ready for extension operations. + * Gets the name of the corresponding resource in Kubernetes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly allowExtensionOperations?: boolean; - /** Gets or sets the type of the os. */ - osType?: OsType; + readonly customResourceName?: string; /** - * Gets or sets os name. + * Gets or sets the current version status of VMware Tools installed in the guest operating system. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; - /** - * Gets or sets the current running status of VMware Tools running in the guest operating system. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsRunningStatus?: string; - /** - * Gets or sets the current version status of VMware Tools installed in the guest operating system. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsVersionStatus?: string; + readonly toolsVersionStatus?: string; /** * Gets or sets the current version of VMware Tools. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly toolsVersion?: string; - /** Specifies the windows configuration for update management. */ - windowsConfiguration?: OsProfileWindowsConfiguration; - /** Specifies the linux configuration for update management. */ - linuxConfiguration?: OsProfileLinuxConfiguration; -} - -/** Specifies the windows configuration for update management. */ -export interface OsProfileWindowsConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Specifies the linux configuration for update management. */ -export interface OsProfileLinuxConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Defines the resource properties. */ -export interface HardwareProfile { - /** Gets or sets memory size in MBs for the vm. */ - memorySizeMB?: number; - /** Gets or sets the number of vCPUs for the vm. */ - numCPUs?: number; - /** Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified. */ - numCoresPerSocket?: number; /** - * Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running. + * Firmware type * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cpuHotAddEnabled?: boolean; + readonly firmwareType?: FirmwareType; /** - * Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running. + * The resource status information. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cpuHotRemoveEnabled?: boolean; + readonly statuses?: ResourceStatus[]; /** - * Gets or sets a value indicating whether memory can be added while this virtual machine is running. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly memoryHotAddEnabled?: boolean; -} - -/** Defines the resource properties. */ -export interface NetworkProfile { - /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterface[]; + readonly provisioningState?: ProvisioningState; } /** Network Interface model */ @@ -1085,17 +882,6 @@ export interface NicIPAddressSettings { readonly subnetMask?: string; } -/** Defines the resource properties. */ -export interface StorageProfile { - /** Gets or sets the list of virtual disks associated with the virtual machine. */ - disks?: VirtualDisk[]; - /** - * Gets or sets the list of virtual SCSI controllers associated with the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scsiControllers?: VirtualScsiController[]; -} - /** Virtual disk model */ export interface VirtualDisk { /** Gets or sets the name of the virtual disk. */ @@ -1126,299 +912,6 @@ export interface VirtualDisk { diskType?: DiskType; } -/** This data object type contains the properties of a SCSI controller device attached to a virtual machine that is reported by the controller. */ -export interface VirtualScsiController { - /** Gets or sets the controller type. */ - type?: ScsiControllerType; - /** Gets or sets the key of the controller. */ - controllerKey?: number; - /** Gets or sets the bus number of the controller. */ - busNumber?: number; - /** Gets or sets the SCSI controller unit number. */ - scsiCtlrUnitNumber?: number; - /** Gets or sets the sharing mode. */ - sharing?: VirtualScsiSharing; -} - -/** Defines the resource properties. */ -export interface GuestAgentProfile { - /** - * Specifies the VM's unique SMBIOS ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmUuid?: string; - /** - * The status of the hybrid machine agent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: StatusTypes; - /** - * The time of the last status change. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastStatusChange?: Date; - /** - * The hybrid machine agent full version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly agentVersion?: string; - /** - * Details about the error state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorDetails?: ErrorDetail[]; -} - -/** Specifies the Security profile settings for the virtual machine. */ -export interface SecurityProfile { - /** Specifies the security settings like secure boot used while creating the virtual machine. */ - uefiSettings?: UefiSettings; -} - -/** Specifies the security settings like secure boot used while creating the virtual machine. */ -export interface UefiSettings { - /** Specifies whether secure boot should be enabled on the virtual machine. */ - secureBootEnabled?: boolean; -} - -/** Managed service identity. */ -export interface Identity { - /** - * The principal id of managed service identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant of managed service identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of managed service identity. */ - type: IdentityType; -} - -/** Defines the virtualMachineUpdate. */ -export interface VirtualMachineUpdate { - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The identity of the resource. */ - identity?: Identity; - /** Defines the resource properties. */ - hardwareProfile?: HardwareProfile; - /** OS properties. */ - osProfile?: OsProfileUpdate; - /** Defines the resource update properties. */ - storageProfile?: StorageProfileUpdate; - /** Defines the update resource properties. */ - networkProfile?: NetworkProfileUpdate; -} - -/** Defines the os update properties. */ -export interface OsProfileUpdate { - /** Specifies the windows configuration for update management. */ - windowsConfiguration?: OsProfileUpdateWindowsConfiguration; - /** Specifies the linux configuration for update management. */ - linuxConfiguration?: OsProfileUpdateLinuxConfiguration; -} - -/** Specifies the windows configuration for update management. */ -export interface OsProfileUpdateWindowsConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Specifies the linux configuration for update management. */ -export interface OsProfileUpdateLinuxConfiguration { - /** Specifies the assessment mode. */ - assessmentMode?: string; - /** Specifies the patch mode. */ - patchMode?: string; -} - -/** Defines the resource update properties. */ -export interface StorageProfileUpdate { - /** Gets or sets the list of virtual disks associated with the virtual machine. */ - disks?: VirtualDiskUpdate[]; -} - -/** Defines the virtual disk update. */ -export interface VirtualDiskUpdate { - /** Gets or sets the name of the virtual disk. */ - name?: string; - /** Gets or sets the disk total size. */ - diskSizeGB?: number; - /** Gets or sets the device key value. */ - deviceKey?: number; - /** Gets or sets the disk mode. */ - diskMode?: DiskMode; - /** Gets or sets the controller id. */ - controllerKey?: number; - /** Gets or sets the unit number of the disk on the controller. */ - unitNumber?: number; - /** Gets or sets the device name. */ - deviceName?: string; - /** Gets or sets the disk backing type. */ - diskType?: DiskType; -} - -/** Defines the update resource properties. */ -export interface NetworkProfileUpdate { - /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterfaceUpdate[]; -} - -/** Defines the network interface update. */ -export interface NetworkInterfaceUpdate { - /** Gets or sets the name of the network interface. */ - name?: string; - /** Gets or sets the ARM Id of the network resource to connect the virtual machine. */ - networkId?: string; - /** NIC type */ - nicType?: NICType; - /** Gets or sets the power on boot. */ - powerOnBoot?: PowerOnBootOption; - /** Gets or sets the device key value. */ - deviceKey?: number; -} - -/** Defines the stop action properties. */ -export interface StopVirtualMachineOptions { - /** Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Defaults to false. */ - skipShutdown?: boolean; -} - -/** List of VirtualMachines. */ -export interface VirtualMachinesList { - /** Url to follow for getting next page of VirtualMachines. */ - nextLink?: string; - /** Array of VirtualMachines */ - value: VirtualMachine[]; -} - -/** Define the virtualMachineTemplate. */ -export interface VirtualMachineTemplate { - /** Gets or sets the location. */ - location: string; - /** Gets or sets the extended location. */ - extendedLocation?: ExtendedLocation; - /** - * The system data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * Gets or sets the name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Gets or sets the Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Gets or sets the type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ - kind?: string; - /** - * Gets or sets a unique identifier for this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** Gets or sets the ARM Id of the vCenter resource in which this template resides. */ - vCenterId?: string; - /** - * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine - * template. - */ - moRefId?: string; - /** Gets or sets the inventory Item ID for the virtual machine template. */ - inventoryItemId?: string; - /** - * Gets or sets the vCenter Managed Object name for the virtual machine template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly moName?: string; - /** - * Gets or sets memory size in MBs for the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memorySizeMB?: number; - /** - * Gets or sets the number of vCPUs for the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numCPUs?: number; - /** - * Gets or sets the number of cores per socket for the template. - * Defaults to 1 if unspecified. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numCoresPerSocket?: number; - /** - * Gets or sets the type of the os. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osType?: OsType; - /** - * Gets or sets os name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osName?: string; - /** - * Gets or sets the folder path of the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly folderPath?: string; - /** - * Gets or sets the network interfaces of the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaces?: NetworkInterface[]; - /** - * Gets or sets the disks the template. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disks?: VirtualDisk[]; - /** - * Gets the name of the corresponding resource in Kubernetes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customResourceName?: string; - /** - * Gets or sets the current version status of VMware Tools installed in the guest operating system. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsVersionStatus?: string; - /** - * Gets or sets the current version of VMware Tools. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly toolsVersion?: string; - /** - * Firmware type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firmwareType?: FirmwareType; - /** - * The resource status information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statuses?: ResourceStatus[]; - /** - * Gets or sets the provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - /** List of VirtualMachineTemplates. */ export interface VirtualMachineTemplatesList { /** Url to follow for getting next page of VirtualMachineTemplates. */ @@ -1484,10 +977,10 @@ export interface VirtualNetwork { */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** List of VirtualNetworks. */ @@ -1498,7 +991,7 @@ export interface VirtualNetworksList { value: VirtualNetwork[]; } -/** Defines the resource properties. */ +/** Describes the properties of an Inventory Item. */ export interface InventoryItemProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ inventoryType: @@ -1516,16 +1009,16 @@ export interface InventoryItemProperties { /** Gets or sets the vCenter Managed Object name for the inventory item. */ moName?: string; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -1539,6 +1032,11 @@ 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; } /** List of InventoryItems. */ @@ -1549,121 +1047,235 @@ export interface InventoryItemsList { value: InventoryItem[]; } -/** List of HybridIdentityMetadata. */ -export interface HybridIdentityMetadataList { - /** Url to follow for getting next page of HybridIdentityMetadata. */ - nextLink?: string; - /** Array of HybridIdentityMetadata */ - value: HybridIdentityMetadata[]; +/** Specifies the compute and storage placement settings for the virtual machine. */ +export interface PlacementProfile { + /** Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. */ + resourcePoolId?: string; + /** Gets or sets the ARM Id of the cluster resource on which this virtual machine will deploy. */ + clusterId?: string; + /** Gets or sets the ARM Id of the host resource on which this virtual machine will deploy. */ + hostId?: string; + /** Gets or sets the ARM Id of the datastore resource on which the data for the virtual machine will be kept. */ + datastoreId?: string; } -/** Describes a Machine Extension. */ -export interface MachineExtension { - /** Gets or sets the location. */ - location?: string; +/** Specifies the operating system settings for the virtual machine. */ +export interface OsProfileForVMInstance { + /** Gets or sets computer name. */ + computerName?: string; + /** Gets or sets administrator username. */ + adminUsername?: string; + /** Sets administrator password. */ + adminPassword?: string; + /** Gets or sets the guestId. */ + guestId?: string; + /** Gets or sets the type of the os. */ + osType?: OsType; /** - * The system data. + * Gets or sets os sku. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; + readonly osSku?: string; /** - * Gets or sets the name. + * Gets or sets the current running status of VMware Tools running in the guest operating system. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly toolsRunningStatus?: string; /** - * Gets or sets the Id. + * Gets or sets the current version status of VMware Tools installed in the guest operating system. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly toolsVersionStatus?: string; /** - * Gets or sets the type of the resource. + * Gets or sets the current version of VMware Tools. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** 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". */ - typePropertiesType?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ - enableAutomaticUpgrade?: boolean; - /** 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; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; + readonly toolsVersion?: string; +} + +/** Specifies the hardware settings for the virtual machine. */ +export interface HardwareProfile { + /** Gets or sets memory size in MBs for the vm. */ + memorySizeMB?: number; + /** Gets or sets the number of vCPUs for the vm. */ + numCPUs?: number; + /** Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified. */ + numCoresPerSocket?: number; /** - * The provisioning state, which only appears in the response. + * Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; - /** The machine extension instance view. */ - instanceView?: MachineExtensionPropertiesInstanceView; -} - -/** Describes the Machine Extension Instance View. */ -export interface MachineExtensionInstanceView { + readonly cpuHotAddEnabled?: boolean; /** - * The machine extension name. + * Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly cpuHotRemoveEnabled?: boolean; /** - * Specifies the type of the extension; an example is "CustomScriptExtension". + * Gets or sets a value indicating whether memory can be added while this virtual machine is running. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly memoryHotAddEnabled?: boolean; +} + +/** Specifies the network interfaces of the virtual machine. */ +export interface NetworkProfile { + /** Gets or sets the list of network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterface[]; +} + +/** Specifies the storage settings for the virtual machine disks. */ +export interface StorageProfile { + /** Gets or sets the list of virtual disks associated with the virtual machine. */ + disks?: VirtualDisk[]; /** - * Specifies the version of the script handler. + * Gets or sets the list of virtual SCSI controllers associated with the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly typeHandlerVersion?: string; - /** Instance view status. */ - status?: MachineExtensionInstanceViewStatus; + readonly scsiControllers?: VirtualScsiController[]; } -/** Instance view status. */ -export interface MachineExtensionInstanceViewStatus { +/** This data object type contains the properties of a SCSI controller device attached to a virtual machine that is reported by the controller. */ +export interface VirtualScsiController { + /** Gets or sets the controller type. */ + type?: ScsiControllerType; + /** Gets or sets the key of the controller. */ + controllerKey?: number; + /** Gets or sets the bus number of the controller. */ + busNumber?: number; + /** Gets or sets the SCSI controller unit number. */ + scsiCtlrUnitNumber?: number; + /** Gets or sets the sharing mode. */ + sharing?: VirtualScsiSharing; +} + +/** Specifies the Security profile settings for the virtual machine. */ +export interface SecurityProfile { + /** Specifies the security settings like secure boot used while creating the virtual machine. */ + uefiSettings?: UefiSettings; +} + +/** Specifies the security settings like secure boot used while creating the virtual machine. */ +export interface UefiSettings { + /** Specifies whether secure boot should be enabled on the virtual machine. */ + secureBootEnabled?: boolean; +} + +/** Specifies the vCenter infrastructure specific settings for the virtual machine. */ +export interface InfrastructureProfile { + /** Gets or sets the ARM Id of the template resource to deploy the virtual machine. */ + templateId?: string; + /** Gets or sets the ARM Id of the vCenter resource in which this resource pool resides. */ + vCenterId?: string; /** - * The status code. + * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly moRefId?: string; + /** Gets or sets the inventory Item ID for the virtual machine. */ + inventoryItemId?: string; /** - * The level code. + * Gets or sets the vCenter Managed Object name for the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly level?: StatusLevelTypes; + readonly moName?: string; /** - * The short localizable label for the status. + * Gets or sets the folder path of the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayStatus?: string; + readonly folderPath?: string; /** - * The detailed status message, including for alerts and error messages. + * Gets or sets the instance uuid of the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly instanceUuid?: string; + /** Gets or sets the SMBIOS UUID of the vm. */ + smbiosUuid?: string; + /** Firmware type */ + firmwareType?: FirmwareType; /** - * The time of the status. + * Gets the name of the corresponding resource in Kubernetes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly time?: Date; + readonly customResourceName?: string; +} + +/** Defines the virtualMachineInstanceUpdate. */ +export interface VirtualMachineInstanceUpdate { + /** Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: HardwareProfile; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: StorageProfileUpdate; + /** Specifies the network interfaces of the virtual machine. */ + networkProfile?: NetworkProfileUpdate; +} + +/** Specifies the storage settings for the virtual machine disks. */ +export interface StorageProfileUpdate { + /** Gets or sets the list of virtual disks associated with the virtual machine. */ + disks?: VirtualDiskUpdate[]; +} + +/** Defines the virtual disk update. */ +export interface VirtualDiskUpdate { + /** Gets or sets the name of the virtual disk. */ + name?: string; + /** Gets or sets the disk total size. */ + diskSizeGB?: number; + /** Gets or sets the device key value. */ + deviceKey?: number; + /** Gets or sets the disk mode. */ + diskMode?: DiskMode; + /** Gets or sets the controller id. */ + controllerKey?: number; + /** Gets or sets the unit number of the disk on the controller. */ + unitNumber?: number; + /** Gets or sets the device name. */ + deviceName?: string; + /** Gets or sets the disk backing type. */ + diskType?: DiskType; +} + +/** Specifies the network interfaces of the virtual machine. */ +export interface NetworkProfileUpdate { + /** Gets or sets the list of network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterfaceUpdate[]; +} + +/** Defines the network interface update. */ +export interface NetworkInterfaceUpdate { + /** Gets or sets the name of the network interface. */ + name?: string; + /** Gets or sets the ARM Id of the network resource to connect the virtual machine. */ + networkId?: string; + /** NIC type */ + nicType?: NICType; + /** Gets or sets the power on boot. */ + powerOnBoot?: PowerOnBootOption; + /** Gets or sets the device key value. */ + deviceKey?: number; +} + +/** List of VirtualMachineInstances. */ +export interface VirtualMachineInstancesList { + /** Url to follow for getting next page of VirtualMachines. */ + nextLink?: string; + /** Array of VirtualMachines */ + value: VirtualMachineInstance[]; +} + +/** Defines the stop action properties. */ +export interface StopVirtualMachineOptions { + /** Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Defaults to false. */ + skipShutdown?: boolean; } -/** Describes the Machine Extensions List Result. */ -export interface MachineExtensionsListResult { - /** The list of extensions */ - value?: MachineExtension[]; - /** The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. */ +/** List of HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadataList { + /** Url to follow for getting next page of HybridIdentityMetadata. */ nextLink?: string; + /** Array of HybridIdentityMetadata */ + value: VmInstanceHybridIdentityMetadata[]; } /** Username / Password Credentials to connect to guest. */ @@ -1712,32 +1324,14 @@ export interface Condition { readonly severity?: string; } -/** Defines the resource properties. */ +/** Describes the properties of an Inventory Item reference. */ export interface InventoryItemDetails { /** Gets or sets the inventory Item ID for the resource. */ inventoryItemId?: string; /** Gets or sets the vCenter Managed Object name for the resource. */ moName?: string; -} - -/** Describes a Machine Extension Update. */ -export interface MachineExtensionUpdate extends ResourcePatch { - /** 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". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ - enableAutomaticUpgrade?: boolean; - /** 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; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; + /** The inventory type. */ + inventoryType?: InventoryType; } /** The resource pool inventory item. */ @@ -1764,6 +1358,8 @@ export interface VirtualMachineInventoryItem extends InventoryItemProperties { host?: InventoryItemDetails; /** ResourcePool inventory resource details. */ resourcePool?: InventoryItemDetails; + /** Cluster inventory resource details. */ + cluster?: InventoryItemDetails; /** Gets or sets the instance uuid of the vm. */ instanceUuid?: string; /** Gets or sets the SMBIOS UUID of the vm. */ @@ -1808,6 +1404,16 @@ export interface VirtualMachineTemplateInventoryItem osType?: OsType; /** Gets or sets os name. */ osName?: string; + /** + * Gets or sets the current version status of VMware Tools installed in the guest operating system. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly toolsVersionStatus?: string; + /** + * Gets or sets the current version of VMware Tools. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly toolsVersion?: string; /** Gets or sets the folder path of the template. */ folderPath?: string; } @@ -1845,17 +1451,8 @@ export interface HostInventoryItem extends InventoryItemProperties { /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} -/** The machine extension instance view. */ -export interface MachineExtensionPropertiesInstanceView - extends MachineExtensionInstanceView {} - /** Defines the inventory item. */ export interface InventoryItem extends ProxyResource { - /** - * The system data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ kind?: string; /** They inventory type. */ @@ -1867,42 +1464,67 @@ export interface InventoryItem extends ProxyResource { /** Gets or sets the vCenter Managed Object name for the inventory item. */ moName?: string; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } -/** Defines the HybridIdentityMetadata. */ -export interface HybridIdentityMetadata extends ProxyResource { +/** Define the virtualMachineInstance. */ +export interface VirtualMachineInstance extends ProxyResource { + /** Gets or sets the extended location. */ + extendedLocation?: ExtendedLocation; + /** Placement properties. */ + placementProfile?: PlacementProfile; + /** OS properties. */ + osProfile?: OsProfileForVMInstance; + /** Hardware properties. */ + hardwareProfile?: HardwareProfile; + /** Network properties. */ + networkProfile?: NetworkProfile; + /** Storage properties. */ + storageProfile?: StorageProfile; + /** Gets the security profile. */ + securityProfile?: SecurityProfile; + /** Gets the infrastructure profile. */ + infrastructureProfile?: InfrastructureProfile; /** - * The system data. + * Gets the power state of the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Gets or sets the Vm Id. */ - vmId?: string; - /** Gets or sets the Public Key. */ - publicKey?: string; + readonly powerState?: string; + /** + * The resource status information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statuses?: ResourceStatus[]; /** - * The identity of the resource. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly identity?: Identity; + readonly provisioningState?: ProvisioningState; /** - * Gets or sets the provisioning state. + * Gets or sets a unique identifier for the vm resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly resourceUid?: string; } -/** Defines the GuestAgent. */ -export interface GuestAgent extends ProxyResource { +/** Defines the HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + resourceUid?: string; + /** Gets or sets the Public Key. */ + publicKey?: string; /** - * The system data. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; +} + +/** Defines the GuestAgent. */ +export interface GuestAgent extends ProxyResource { /** * Gets or sets a unique identifier for this resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1910,6 +1532,8 @@ export interface GuestAgent extends ProxyResource { readonly uuid?: string; /** Username / Password Credentials to provision guest agent. */ credentials?: GuestCredential; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; /** HTTP Proxy configuration for the VM. */ httpProxyConfig?: HttpProxyConfiguration; /** Gets or sets the guest agent provisioning action. */ @@ -1930,236 +1554,76 @@ export interface GuestAgent extends ProxyResource { */ readonly statuses?: ResourceStatus[]; /** - * Gets or sets the provisioning state. + * Gets the provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } -/** Known values of {@link PatchOperationStatus} that the service accepts. */ -export enum KnownPatchOperationStatus { - /** Unknown */ - Unknown = "Unknown", - /** InProgress */ - InProgress = "InProgress", - /** Failed */ - Failed = "Failed", - /** Succeeded */ - Succeeded = "Succeeded", - /** CompletedWithWarnings */ - CompletedWithWarnings = "CompletedWithWarnings" +/** Defines headers for ResourcePools_delete operation. */ +export interface ResourcePoolsDeleteHeaders { + location?: string; } -/** - * Defines values for PatchOperationStatus. \ - * {@link KnownPatchOperationStatus} can be used interchangeably with PatchOperationStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **InProgress** \ - * **Failed** \ - * **Succeeded** \ - * **CompletedWithWarnings** - */ -export type PatchOperationStatus = string; - -/** Known values of {@link PatchOperationStartedBy} that the service accepts. */ -export enum KnownPatchOperationStartedBy { - /** User */ - User = "User", - /** Platform */ - Platform = "Platform" +/** Defines headers for Clusters_delete operation. */ +export interface ClustersDeleteHeaders { + location?: string; } -/** - * Defines values for PatchOperationStartedBy. \ - * {@link KnownPatchOperationStartedBy} can be used interchangeably with PatchOperationStartedBy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Platform** - */ -export type PatchOperationStartedBy = string; - -/** Known values of {@link PatchServiceUsed} that the service accepts. */ -export enum KnownPatchServiceUsed { - /** Unknown */ - Unknown = "Unknown", - /** WU */ - WU = "WU", - /** WUWsus */ - WUWsus = "WU_WSUS", - /** YUM */ - YUM = "YUM", - /** APT */ - APT = "APT", - /** Zypper */ - Zypper = "Zypper" +/** Defines headers for Hosts_delete operation. */ +export interface HostsDeleteHeaders { + location?: string; } -/** - * Defines values for PatchServiceUsed. \ - * {@link KnownPatchServiceUsed} can be used interchangeably with PatchServiceUsed, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **WU** \ - * **WU_WSUS** \ - * **YUM** \ - * **APT** \ - * **Zypper** - */ -export type PatchServiceUsed = string; - -/** Known values of {@link OsTypeUM} that the service accepts. */ -export enum KnownOsTypeUM { - /** Windows */ - Windows = "Windows", - /** Linux */ - Linux = "Linux" +/** Defines headers for Datastores_delete operation. */ +export interface DatastoresDeleteHeaders { + location?: string; } -/** - * Defines values for OsTypeUM. \ - * {@link KnownOsTypeUM} can be used interchangeably with OsTypeUM, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows** \ - * **Linux** - */ -export type OsTypeUM = string; +/** Defines headers for VCenters_delete operation. */ +export interface VCentersDeleteHeaders { + location?: string; +} -/** Known values of {@link VMGuestPatchRebootSetting} that the service accepts. */ -export enum KnownVMGuestPatchRebootSetting { - /** IfRequired */ - IfRequired = "IfRequired", - /** Never */ - Never = "Never", - /** Always */ - Always = "Always" +/** Defines headers for VirtualMachineTemplates_delete operation. */ +export interface VirtualMachineTemplatesDeleteHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchRebootSetting. \ - * {@link KnownVMGuestPatchRebootSetting} can be used interchangeably with VMGuestPatchRebootSetting, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IfRequired** \ - * **Never** \ - * **Always** - */ -export type VMGuestPatchRebootSetting = string; - -/** Known values of {@link VMGuestPatchClassificationWindows} that the service accepts. */ -export enum KnownVMGuestPatchClassificationWindows { - /** Critical */ - Critical = "Critical", - /** Security */ - Security = "Security", - /** UpdateRollUp */ - UpdateRollUp = "UpdateRollUp", - /** FeaturePack */ - FeaturePack = "FeaturePack", - /** ServicePack */ - ServicePack = "ServicePack", - /** Definition */ - Definition = "Definition", - /** Tools */ - Tools = "Tools", - /** Updates */ - Updates = "Updates" +/** Defines headers for VirtualNetworks_delete operation. */ +export interface VirtualNetworksDeleteHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchClassificationWindows. \ - * {@link KnownVMGuestPatchClassificationWindows} can be used interchangeably with VMGuestPatchClassificationWindows, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Critical** \ - * **Security** \ - * **UpdateRollUp** \ - * **FeaturePack** \ - * **ServicePack** \ - * **Definition** \ - * **Tools** \ - * **Updates** - */ -export type VMGuestPatchClassificationWindows = string; - -/** Known values of {@link VMGuestPatchClassificationLinux} that the service accepts. */ -export enum KnownVMGuestPatchClassificationLinux { - /** Critical */ - Critical = "Critical", - /** Security */ - Security = "Security", - /** Other */ - Other = "Other" +/** Defines headers for VirtualMachineInstances_update operation. */ +export interface VirtualMachineInstancesUpdateHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchClassificationLinux. \ - * {@link KnownVMGuestPatchClassificationLinux} can be used interchangeably with VMGuestPatchClassificationLinux, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Critical** \ - * **Security** \ - * **Other** - */ -export type VMGuestPatchClassificationLinux = string; +/** Defines headers for VirtualMachineInstances_delete operation. */ +export interface VirtualMachineInstancesDeleteHeaders { + location?: string; +} -/** Known values of {@link VMGuestPatchRebootStatus} that the service accepts. */ -export enum KnownVMGuestPatchRebootStatus { - /** Unknown */ - Unknown = "Unknown", - /** NotNeeded */ - NotNeeded = "NotNeeded", - /** Required */ - Required = "Required", - /** Started */ - Started = "Started", - /** Failed */ - Failed = "Failed", - /** Completed */ - Completed = "Completed" +/** Defines headers for VirtualMachineInstances_stop operation. */ +export interface VirtualMachineInstancesStopHeaders { + location?: string; } -/** - * Defines values for VMGuestPatchRebootStatus. \ - * {@link KnownVMGuestPatchRebootStatus} can be used interchangeably with VMGuestPatchRebootStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **NotNeeded** \ - * **Required** \ - * **Started** \ - * **Failed** \ - * **Completed** - */ -export type VMGuestPatchRebootStatus = string; +/** Defines headers for VirtualMachineInstances_start operation. */ +export interface VirtualMachineInstancesStartHeaders { + location?: string; +} -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" +/** Defines headers for VirtualMachineInstances_restart operation. */ +export interface VirtualMachineInstancesRestartHeaders { + location?: string; } -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; +/** Defines headers for VMInstanceGuestAgents_delete operation. */ +export interface VMInstanceGuestAgentsDeleteHeaders { + location?: string; +} /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { @@ -2186,16 +1650,40 @@ export enum KnownProvisioningState { * {@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** \ - * **Provisioning** \ - * **Updating** \ - * **Deleting** \ - * **Accepted** \ - * **Created** + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Provisioning** \ + * **Updating** \ + * **Deleting** \ + * **Accepted** \ + * **Created** + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines 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 ProvisioningState = string; +export type CreatedByType = string; /** Known values of {@link OsType} that the service accepts. */ export enum KnownOsType { @@ -2350,72 +1838,6 @@ export enum KnownDiskType { */ export type DiskType = string; -/** Known values of {@link ScsiControllerType} that the service accepts. */ -export enum KnownScsiControllerType { - /** Lsilogic */ - Lsilogic = "lsilogic", - /** Buslogic */ - Buslogic = "buslogic", - /** Pvscsi */ - Pvscsi = "pvscsi", - /** Lsilogicsas */ - Lsilogicsas = "lsilogicsas" -} - -/** - * Defines values for ScsiControllerType. \ - * {@link KnownScsiControllerType} can be used interchangeably with ScsiControllerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **lsilogic** \ - * **buslogic** \ - * **pvscsi** \ - * **lsilogicsas** - */ -export type ScsiControllerType = string; - -/** Known values of {@link VirtualScsiSharing} that the service accepts. */ -export enum KnownVirtualScsiSharing { - /** NoSharing */ - NoSharing = "noSharing", - /** PhysicalSharing */ - PhysicalSharing = "physicalSharing", - /** VirtualSharing */ - VirtualSharing = "virtualSharing" -} - -/** - * Defines values for VirtualScsiSharing. \ - * {@link KnownVirtualScsiSharing} can be used interchangeably with VirtualScsiSharing, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **noSharing** \ - * **physicalSharing** \ - * **virtualSharing** - */ -export type VirtualScsiSharing = string; - -/** Known values of {@link StatusTypes} that the service accepts. */ -export enum KnownStatusTypes { - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Error */ - Error = "Error" -} - -/** - * Defines values for StatusTypes. \ - * {@link KnownStatusTypes} can be used interchangeably with StatusTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Disconnected** \ - * **Error** - */ -export type StatusTypes = string; - /** Known values of {@link FirmwareType} that the service accepts. */ export enum KnownFirmwareType { /** Bios */ @@ -2434,24 +1856,6 @@ export enum KnownFirmwareType { */ export type FirmwareType = string; -/** Known values of {@link IdentityType} that the service accepts. */ -export enum KnownIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned" -} - -/** - * Defines values for IdentityType. \ - * {@link KnownIdentityType} can be used interchangeably with IdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** - */ -export type IdentityType = string; - /** Known values of {@link InventoryType} that the service accepts. */ export enum KnownInventoryType { /** ResourcePool */ @@ -2485,26 +1889,50 @@ export enum KnownInventoryType { */ export type InventoryType = string; -/** Known values of {@link StatusLevelTypes} that the service accepts. */ -export enum KnownStatusLevelTypes { - /** Info */ - Info = "Info", - /** Warning */ - Warning = "Warning", - /** Error */ - Error = "Error" +/** Known values of {@link ScsiControllerType} that the service accepts. */ +export enum KnownScsiControllerType { + /** Lsilogic */ + Lsilogic = "lsilogic", + /** Buslogic */ + Buslogic = "buslogic", + /** Pvscsi */ + Pvscsi = "pvscsi", + /** Lsilogicsas */ + Lsilogicsas = "lsilogicsas" +} + +/** + * Defines values for ScsiControllerType. \ + * {@link KnownScsiControllerType} can be used interchangeably with ScsiControllerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **lsilogic** \ + * **buslogic** \ + * **pvscsi** \ + * **lsilogicsas** + */ +export type ScsiControllerType = string; + +/** Known values of {@link VirtualScsiSharing} that the service accepts. */ +export enum KnownVirtualScsiSharing { + /** NoSharing */ + NoSharing = "noSharing", + /** PhysicalSharing */ + PhysicalSharing = "physicalSharing", + /** VirtualSharing */ + VirtualSharing = "virtualSharing" } /** - * Defines values for StatusLevelTypes. \ - * {@link KnownStatusLevelTypes} can be used interchangeably with StatusLevelTypes, + * Defines values for VirtualScsiSharing. \ + * {@link KnownVirtualScsiSharing} can be used interchangeably with VirtualScsiSharing, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Info** \ - * **Warning** \ - * **Error** + * **noSharing** \ + * **physicalSharing** \ + * **virtualSharing** */ -export type StatusLevelTypes = string; +export type VirtualScsiSharing = string; /** Known values of {@link ProvisioningAction} that the service accepts. */ export enum KnownProvisioningAction { @@ -2541,135 +1969,6 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationsList; -/** Optional parameters. */ -export interface VirtualMachinesAssessPatchesOptionalParams - 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 assessPatches operation. */ -export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult; - -/** Optional parameters. */ -export interface VirtualMachinesInstallPatchesOptionalParams - 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 installPatches operation. */ -export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult; - -/** Optional parameters. */ -export interface VirtualMachinesCreateOptionalParams - extends coreClient.OperationOptions { - /** Request payload. */ - body?: VirtualMachine; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type VirtualMachinesCreateResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualMachinesGetResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Resource properties to update. */ - body?: VirtualMachineUpdate; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type VirtualMachinesUpdateResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Whether force delete was specified. */ - force?: boolean; - /** Whether to just disable the VM from azure and retain the VM in the VMM. */ - retain?: boolean; - /** 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 VirtualMachinesStopOptionalParams - extends coreClient.OperationOptions { - /** Virtualmachine stop action payload. */ - body?: StopVirtualMachineOptions; - /** 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 VirtualMachinesStartOptionalParams - 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 VirtualMachinesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualMachinesListResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualMachinesListByResourceGroupResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualMachinesListNextResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachinesList; - /** Optional parameters. */ export interface ResourcePoolsCreateOptionalParams extends coreClient.OperationOptions { @@ -3191,54 +2490,79 @@ export interface InventoryItemsListByVCenterNextOptionalParams export type InventoryItemsListByVCenterNextResponse = InventoryItemsList; /** Optional parameters. */ -export interface HybridIdentityMetadataCreateOptionalParams +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Request payload. */ - body?: HybridIdentityMetadata; + body?: VirtualMachineInstance; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the create operation. */ -export type HybridIdentityMetadataCreateResponse = HybridIdentityMetadata; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface HybridIdentityMetadataGetOptionalParams +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface HybridIdentityMetadataDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Resource properties to update. */ + body?: VirtualMachineInstanceUpdate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface HybridIdentityMetadataListByVmOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Whether force delete was specified. */ + force?: boolean; + /** Whether to delete the VM from the vCenter. */ + deleteFromHost?: boolean; + /** 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 listByVm operation. */ -export type HybridIdentityMetadataListByVmResponse = HybridIdentityMetadataList; +/** Contains response data for the delete operation. */ +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; /** Optional parameters. */ -export interface HybridIdentityMetadataListByVmNextOptionalParams +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVmNext operation. */ -export type HybridIdentityMetadataListByVmNextResponse = HybridIdentityMetadataList; +/** Contains response data for the list operation. */ +export type VirtualMachineInstancesListResponse = VirtualMachineInstancesList; /** Optional parameters. */ -export interface MachineExtensionsCreateOrUpdateOptionalParams +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + /** Virtualmachine stop action payload. */ + body?: StopVirtualMachineOptions; /** 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 MachineExtensionsCreateOrUpdateResponse = MachineExtension; +/** Contains response data for the stop operation. */ +export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; /** Optional parameters. */ -export interface MachineExtensionsUpdateOptionalParams +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3246,11 +2570,11 @@ export interface MachineExtensionsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type MachineExtensionsUpdateResponse = MachineExtension; +/** Contains response data for the start operation. */ +export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; /** Optional parameters. */ -export interface MachineExtensionsDeleteOptionalParams +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3258,32 +2582,39 @@ export interface MachineExtensionsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the restart operation. */ +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; + +/** Optional parameters. */ +export interface VirtualMachineInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstancesList; + /** Optional parameters. */ -export interface MachineExtensionsGetOptionalParams +export interface VmInstanceHybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type MachineExtensionsGetResponse = MachineExtension; +export type VmInstanceHybridIdentityMetadataGetResponse = VmInstanceHybridIdentityMetadata; /** Optional parameters. */ -export interface MachineExtensionsListOptionalParams - extends coreClient.OperationOptions { - /** The expand expression to apply on the operation. */ - expand?: string; -} +export interface VmInstanceHybridIdentityMetadataListOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type MachineExtensionsListResponse = MachineExtensionsListResult; +export type VmInstanceHybridIdentityMetadataListResponse = VmInstanceHybridIdentityMetadataList; /** Optional parameters. */ -export interface MachineExtensionsListNextOptionalParams +export interface VmInstanceHybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type MachineExtensionsListNextResponse = MachineExtensionsListResult; +export type VmInstanceHybridIdentityMetadataListNextResponse = VmInstanceHybridIdentityMetadataList; /** Optional parameters. */ -export interface GuestAgentsCreateOptionalParams +export interface VMInstanceGuestAgentsCreateOptionalParams extends coreClient.OperationOptions { /** Request payload. */ body?: GuestAgent; @@ -3294,17 +2625,17 @@ export interface GuestAgentsCreateOptionalParams } /** Contains response data for the create operation. */ -export type GuestAgentsCreateResponse = GuestAgent; +export type VMInstanceGuestAgentsCreateResponse = GuestAgent; /** Optional parameters. */ -export interface GuestAgentsGetOptionalParams +export interface VMInstanceGuestAgentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type GuestAgentsGetResponse = GuestAgent; +export type VMInstanceGuestAgentsGetResponse = GuestAgent; /** Optional parameters. */ -export interface GuestAgentsDeleteOptionalParams +export interface VMInstanceGuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3312,19 +2643,22 @@ export interface GuestAgentsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the delete operation. */ +export type VMInstanceGuestAgentsDeleteResponse = VMInstanceGuestAgentsDeleteHeaders; + /** Optional parameters. */ -export interface GuestAgentsListByVmOptionalParams +export interface VMInstanceGuestAgentsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVm operation. */ -export type GuestAgentsListByVmResponse = GuestAgentList; +/** Contains response data for the list operation. */ +export type VMInstanceGuestAgentsListResponse = GuestAgentList; /** Optional parameters. */ -export interface GuestAgentsListByVmNextOptionalParams +export interface VMInstanceGuestAgentsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVmNext operation. */ -export type GuestAgentsListByVmNextResponse = GuestAgentList; +/** Contains response data for the listNext operation. */ +export type VMInstanceGuestAgentsListNextResponse = GuestAgentList; /** Optional parameters. */ export interface AzureArcVMwareManagementServiceAPIOptionalParams diff --git a/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts b/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts index 8d5331ccb4d3..f97a72eaccac 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/models/mappers.ts @@ -106,17 +106,17 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDefinition" + className: "ErrorDetail" } } } } }; -export const ErrorDefinition: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDefinition", + className: "ErrorDetail", modelProperties: { code: { serializedName: "code", @@ -132,6 +132,13 @@ export const ErrorDefinition: coreClient.CompositeMapper = { name: "String" } }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, details: { serializedName: "details", readOnly: true, @@ -140,7 +147,20 @@ export const ErrorDefinition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDefinition" + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -149,242 +169,202 @@ export const ErrorDefinition: coreClient.CompositeMapper = { } }; -export const VirtualMachineAssessPatchesResult: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineAssessPatchesResult", + className: "ErrorAdditionalInfo", modelProperties: { - status: { - serializedName: "status", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - assessmentActivityId: { - serializedName: "assessmentActivityId", + info: { + serializedName: "info", readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const ResourcePool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePool", + modelProperties: { + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - rebootPending: { - serializedName: "rebootPending", - readOnly: true, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Boolean" + name: "Composite", + className: "ExtendedLocation" } }, - availablePatchCountByClassification: { - serializedName: "availablePatchCountByClassification", + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "AvailablePatchCountByClassification" + className: "SystemData" } }, - startDateTime: { - serializedName: "startDateTime", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } }, - lastModifiedDateTime: { - serializedName: "lastModifiedDateTime", + name: { + serializedName: "name", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - startedBy: { - serializedName: "startedBy", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - patchServiceUsed: { - serializedName: "patchServiceUsed", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - osType: { - serializedName: "osType", + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + uuid: { + serializedName: "properties.uuid", readOnly: true, type: { name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + vCenterId: { + serializedName: "properties.vCenterId", type: { - name: "Composite", - className: "ErrorDetail" + name: "String" } - } - } - } -}; - -export const AvailablePatchCountByClassification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailablePatchCountByClassification", - modelProperties: { - security: { - serializedName: "security", - readOnly: true, + }, + moRefId: { + serializedName: "properties.moRefId", type: { - name: "Number" + name: "String" } }, - critical: { - serializedName: "critical", - readOnly: true, + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { - name: "Number" + name: "String" } }, - definition: { - serializedName: "definition", + moName: { + serializedName: "properties.moName", readOnly: true, type: { - name: "Number" + name: "String" } }, - updateRollup: { - serializedName: "updateRollup", + cpuSharesLevel: { + serializedName: "properties.cpuSharesLevel", readOnly: true, type: { - name: "Number" + name: "String" } }, - featurePack: { - serializedName: "featurePack", + cpuReservationMHz: { + serializedName: "properties.cpuReservationMHz", readOnly: true, type: { name: "Number" } }, - servicePack: { - serializedName: "servicePack", + cpuLimitMHz: { + serializedName: "properties.cpuLimitMHz", readOnly: true, type: { name: "Number" } }, - tools: { - serializedName: "tools", + memSharesLevel: { + serializedName: "properties.memSharesLevel", readOnly: true, type: { - name: "Number" + name: "String" } }, - updates: { - serializedName: "updates", + memReservationMB: { + serializedName: "properties.memReservationMB", readOnly: true, type: { name: "Number" } }, - other: { - serializedName: "other", + memLimitMB: { + serializedName: "properties.memLimitMB", readOnly: true, type: { name: "Number" } - } - } - } -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - required: true, - type: { - name: "String" - } }, - message: { - serializedName: "message", - required: true, + memOverallUsageGB: { + serializedName: "properties.memOverallUsageGB", + readOnly: true, type: { - name: "String" + name: "Number" } }, - target: { - serializedName: "target", + memCapacityGB: { + serializedName: "properties.memCapacityGB", + readOnly: true, type: { - name: "String" + name: "Number" } }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } - } - } -}; - -export const VirtualMachineInstallPatchesParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstallPatchesParameters", - modelProperties: { - maximumDuration: { - serializedName: "maximumDuration", - required: true, + cpuOverallUsageMHz: { + serializedName: "properties.cpuOverallUsageMHz", + readOnly: true, type: { - name: "String" + name: "Number" } }, - rebootSetting: { - serializedName: "rebootSetting", - required: true, + cpuCapacityMHz: { + serializedName: "properties.cpuCapacityMHz", + readOnly: true, type: { - name: "String" + name: "Number" } }, - windowsParameters: { - serializedName: "windowsParameters", + customResourceName: { + serializedName: "properties.customResourceName", + readOnly: true, type: { - name: "Composite", - className: "WindowsParameters" + name: "String" } }, - linuxParameters: { - serializedName: "linuxParameters", - type: { - name: "Composite", - className: "LinuxParameters" - } - } - } - } -}; - -export const WindowsParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WindowsParameters", - modelProperties: { - classificationsToInclude: { - serializedName: "classificationsToInclude", + datastoreIds: { + serializedName: "properties.datastoreIds", + readOnly: true, type: { name: "Sequence", element: { @@ -394,8 +374,9 @@ export const WindowsParameters: coreClient.CompositeMapper = { } } }, - kbNumbersToInclude: { - serializedName: "kbNumbersToInclude", + networkIds: { + serializedName: "properties.networkIds", + readOnly: true, type: { name: "Sequence", element: { @@ -405,80 +386,42 @@ export const WindowsParameters: coreClient.CompositeMapper = { } } }, - kbNumbersToExclude: { - serializedName: "kbNumbersToExclude", + statuses: { + serializedName: "properties.statuses", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ResourceStatus" } } } }, - excludeKbsRequiringReboot: { - serializedName: "excludeKbsRequiringReboot", - type: { - name: "Boolean" - } - }, - maxPatchPublishDate: { - serializedName: "maxPatchPublishDate", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "DateTime" + name: "String" } } } } }; -export const LinuxParameters: coreClient.CompositeMapper = { +export const ResourceStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinuxParameters", + className: "ResourceStatus", modelProperties: { - classificationsToInclude: { - serializedName: "classificationsToInclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - packageNameMasksToInclude: { - serializedName: "packageNameMasksToInclude", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - packageNameMasksToExclude: { - serializedName: "packageNameMasksToExclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const VirtualMachineInstallPatchesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineInstallPatchesResult", - modelProperties: { status: { serializedName: "status", readOnly: true, @@ -486,112 +429,152 @@ export const VirtualMachineInstallPatchesResult: coreClient.CompositeMapper = { name: "String" } }, - installationActivityId: { - serializedName: "installationActivityId", + reason: { + serializedName: "reason", readOnly: true, type: { name: "String" } }, - rebootStatus: { - serializedName: "rebootStatus", + message: { + serializedName: "message", readOnly: true, type: { name: "String" } }, - maintenanceWindowExceeded: { - serializedName: "maintenanceWindowExceeded", + severity: { + serializedName: "severity", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - excludedPatchCount: { - serializedName: "excludedPatchCount", - readOnly: true, - type: { - name: "Number" - } - }, - notSelectedPatchCount: { - serializedName: "notSelectedPatchCount", + lastUpdatedAt: { + serializedName: "lastUpdatedAt", readOnly: true, type: { - name: "Number" + name: "DateTime" } - }, - pendingPatchCount: { - serializedName: "pendingPatchCount", - readOnly: true, + } + } + } +}; + +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + type: { + serializedName: "type", type: { - name: "Number" + name: "String" } }, - installedPatchCount: { - serializedName: "installedPatchCount", - readOnly: true, + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } - }, - failedPatchCount: { - serializedName: "failedPatchCount", - readOnly: true, + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", type: { - name: "Number" + name: "String" } }, - startDateTime: { - serializedName: "startDateTime", - readOnly: true, + createdByType: { + serializedName: "createdByType", type: { - name: "DateTime" + name: "String" } }, - lastModifiedDateTime: { - serializedName: "lastModifiedDateTime", - readOnly: true, + createdAt: { + serializedName: "createdAt", type: { name: "DateTime" } }, - startedBy: { - serializedName: "startedBy", - readOnly: true, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - patchServiceUsed: { - serializedName: "patchServiceUsed", - readOnly: true, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - osType: { - serializedName: "osType", - readOnly: true, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ResourcePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ResourcePoolsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePoolsList", + modelProperties: { + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "ErrorDetail" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcePool" + } + } } } } } }; -export const ResourcePool: coreClient.CompositeMapper = { +export const Cluster: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourcePool", + className: "Cluster", modelProperties: { location: { serializedName: "location", @@ -680,64 +663,74 @@ export const ResourcePool: coreClient.CompositeMapper = { name: "String" } }, - cpuSharesLevel: { - serializedName: "properties.cpuSharesLevel", + statuses: { + serializedName: "properties.statuses", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceStatus" + } + } } }, - cpuReservationMHz: { - serializedName: "properties.cpuReservationMHz", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { - name: "Number" + name: "String" } }, - cpuLimitMHz: { - serializedName: "properties.cpuLimitMHz", + usedMemoryGB: { + serializedName: "properties.usedMemoryGB", readOnly: true, type: { name: "Number" } }, - memSharesLevel: { - serializedName: "properties.memSharesLevel", + totalMemoryGB: { + serializedName: "properties.totalMemoryGB", readOnly: true, type: { - name: "String" + name: "Number" } }, - memReservationMB: { - serializedName: "properties.memReservationMB", + usedCpuMHz: { + serializedName: "properties.usedCpuMHz", readOnly: true, type: { name: "Number" } }, - memLimitMB: { - serializedName: "properties.memLimitMB", + totalCpuMHz: { + serializedName: "properties.totalCpuMHz", readOnly: true, type: { name: "Number" } }, - customResourceName: { - serializedName: "properties.customResourceName", + datastoreIds: { + serializedName: "properties.datastoreIds", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - statuses: { - serializedName: "properties.statuses", + networkIds: { + serializedName: "properties.networkIds", readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ResourceStatus" + name: "String" } } } @@ -753,143 +746,213 @@ export const ResourcePool: coreClient.CompositeMapper = { } }; -export const ResourceStatus: coreClient.CompositeMapper = { +export const ClustersList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceStatus", + className: "ClustersList", modelProperties: { - type: { - serializedName: "type", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } + } + } + } + } +}; + +export const Host: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Host", + modelProperties: { + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - reason: { - serializedName: "reason", + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - severity: { - serializedName: "severity", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - lastUpdatedAt: { - serializedName: "lastUpdatedAt", - readOnly: true, + kind: { + serializedName: "kind", type: { - name: "DateTime" + name: "String" } - } - } - } -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - type: { - serializedName: "type", + }, + uuid: { + serializedName: "properties.uuid", + readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + vCenterId: { + serializedName: "properties.vCenterId", type: { name: "String" } - } - } - } -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", + }, + moRefId: { + serializedName: "properties.moRefId", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", + moName: { + serializedName: "properties.moName", + readOnly: true, type: { - name: "DateTime" + name: "String" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + statuses: { + serializedName: "properties.statuses", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceStatus" + } + } } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + customResourceName: { + serializedName: "properties.customResourceName", + readOnly: true, type: { name: "String" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + overallMemoryUsageGB: { + serializedName: "properties.overallMemoryUsageGB", + readOnly: true, type: { - name: "DateTime" + name: "Number" } - } - } - } -}; - -export const ResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", + }, + memorySizeGB: { + serializedName: "properties.memorySizeGB", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Number" + } + }, + overallCpuUsageMHz: { + serializedName: "properties.overallCpuUsageMHz", + readOnly: true, + type: { + name: "Number" + } + }, + cpuMhz: { + serializedName: "properties.cpuMhz", + readOnly: true, + type: { + name: "Number" + } + }, + datastoreIds: { + serializedName: "properties.datastoreIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + networkIds: { + serializedName: "properties.networkIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" } } } } }; -export const ResourcePoolsList: coreClient.CompositeMapper = { +export const HostsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourcePoolsList", + className: "HostsList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -905,7 +968,7 @@ export const ResourcePoolsList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ResourcePool" + className: "Host" } } } @@ -914,10 +977,10 @@ export const ResourcePoolsList: coreClient.CompositeMapper = { } }; -export const Cluster: coreClient.CompositeMapper = { +export const Datastore: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cluster", + className: "Datastore", modelProperties: { location: { serializedName: "location", @@ -1026,28 +1089,18 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, - datastoreIds: { - serializedName: "properties.datastoreIds", + capacityGB: { + serializedName: "properties.capacityGB", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - networkIds: { - serializedName: "properties.networkIds", + freeSpaceGB: { + serializedName: "properties.freeSpaceGB", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, provisioningState: { @@ -1061,10 +1114,10 @@ export const Cluster: coreClient.CompositeMapper = { } }; -export const ClustersList: coreClient.CompositeMapper = { +export const DatastoresList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClustersList", + className: "DatastoresList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -1080,7 +1133,7 @@ export const ClustersList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Cluster" + className: "Datastore" } } } @@ -1089,10 +1142,10 @@ export const ClustersList: coreClient.CompositeMapper = { } }; -export const Host: coreClient.CompositeMapper = { +export const VCenter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Host", + className: "VCenter", modelProperties: { location: { serializedName: "location", @@ -1156,31 +1209,58 @@ export const Host: coreClient.CompositeMapper = { name: "String" } }, - vCenterId: { - serializedName: "properties.vCenterId", + fqdn: { + serializedName: "properties.fqdn", + required: true, type: { name: "String" } }, - moRefId: { - serializedName: "properties.moRefId", + port: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "properties.port", + type: { + name: "Number" + } + }, + version: { + serializedName: "properties.version", + readOnly: true, type: { name: "String" } }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", + instanceUuid: { + serializedName: "properties.instanceUuid", + readOnly: true, type: { name: "String" } }, - moName: { - serializedName: "properties.moName", + connectionStatus: { + serializedName: "properties.connectionStatus", + readOnly: true, + type: { + name: "String" + } + }, + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "VICredential" + } + }, statuses: { serializedName: "properties.statuses", readOnly: true, @@ -1194,16 +1274,30 @@ export const Host: coreClient.CompositeMapper = { } } }, - customResourceName: { - serializedName: "properties.customResourceName", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const VICredential: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VICredential", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + password: { + serializedName: "password", type: { name: "String" } @@ -1212,10 +1306,10 @@ export const Host: coreClient.CompositeMapper = { } }; -export const HostsList: coreClient.CompositeMapper = { +export const VCentersList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HostsList", + className: "VCentersList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -1231,7 +1325,7 @@ export const HostsList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Host" + className: "VCenter" } } } @@ -1240,10 +1334,10 @@ export const HostsList: coreClient.CompositeMapper = { } }; -export const Datastore: coreClient.CompositeMapper = { +export const VirtualMachineTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Datastore", + className: "VirtualMachineTemplate", modelProperties: { location: { serializedName: "location", @@ -1332,184 +1426,102 @@ export const Datastore: coreClient.CompositeMapper = { name: "String" } }, - statuses: { - serializedName: "properties.statuses", + memorySizeMB: { + serializedName: "properties.memorySizeMB", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceStatus" - } - } + name: "Number" } }, - customResourceName: { - serializedName: "properties.customResourceName", + numCPUs: { + serializedName: "properties.numCPUs", + readOnly: true, + type: { + name: "Number" + } + }, + numCoresPerSocket: { + serializedName: "properties.numCoresPerSocket", + readOnly: true, + type: { + name: "Number" + } + }, + osType: { + serializedName: "properties.osType", readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + osName: { + serializedName: "properties.osName", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const DatastoresList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatastoresList", - modelProperties: { - nextLink: { - serializedName: "nextLink", + }, + folderPath: { + serializedName: "properties.folderPath", + readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + networkInterfaces: { + serializedName: "properties.networkInterfaces", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Datastore" + className: "NetworkInterface" } } } - } - } - } -}; - -export const VCenter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VCenter", - modelProperties: { - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } }, - uuid: { - serializedName: "properties.uuid", + disks: { + serializedName: "properties.disks", readOnly: true, type: { - name: "String" - } - }, - fqdn: { - serializedName: "properties.fqdn", - required: true, - type: { - name: "String" - } - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - serializedName: "properties.port", - type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } } }, - version: { - serializedName: "properties.version", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, - instanceUuid: { - serializedName: "properties.instanceUuid", + toolsVersionStatus: { + serializedName: "properties.toolsVersionStatus", readOnly: true, type: { name: "String" } }, - connectionStatus: { - serializedName: "properties.connectionStatus", + toolsVersion: { + serializedName: "properties.toolsVersion", readOnly: true, type: { name: "String" } }, - customResourceName: { - serializedName: "properties.customResourceName", + firmwareType: { + serializedName: "properties.firmwareType", readOnly: true, type: { name: "String" } }, - credentials: { - serializedName: "properties.credentials", - type: { - name: "Composite", - className: "VICredential" - } - }, statuses: { serializedName: "properties.statuses", readOnly: true, @@ -1534,1052 +1546,190 @@ export const VCenter: coreClient.CompositeMapper = { } }; -export const VICredential: coreClient.CompositeMapper = { +export const NetworkInterface: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VICredential", + className: "NetworkInterface", modelProperties: { - username: { - serializedName: "username", + name: { + serializedName: "name", type: { name: "String" } }, - password: { - serializedName: "password", - type: { - name: "String" - } - } - } - } -}; - -export const VCentersList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VCentersList", - modelProperties: { - nextLink: { - serializedName: "nextLink", + label: { + serializedName: "label", + readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + ipAddresses: { + serializedName: "ipAddresses", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "VCenter" + name: "String" } } } - } - } - } -}; - -export const VirtualMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachine", - modelProperties: { - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } }, - id: { - serializedName: "id", + macAddress: { + serializedName: "macAddress", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + networkId: { + serializedName: "networkId", type: { name: "String" } }, - kind: { - serializedName: "kind", + nicType: { + serializedName: "nicType", type: { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, - resourcePoolId: { - serializedName: "properties.resourcePoolId", + powerOnBoot: { + serializedName: "powerOnBoot", type: { name: "String" } }, - templateId: { - serializedName: "properties.templateId", + networkMoRefId: { + serializedName: "networkMoRefId", + readOnly: true, type: { name: "String" } }, - vCenterId: { - serializedName: "properties.vCenterId", + networkMoName: { + serializedName: "networkMoName", + readOnly: true, type: { name: "String" } }, - placementProfile: { - serializedName: "properties.placementProfile", + deviceKey: { + serializedName: "deviceKey", type: { - name: "Composite", - className: "PlacementProfile" + name: "Number" } }, - osProfile: { - serializedName: "properties.osProfile", - type: { - name: "Composite", - className: "OsProfile" - } - }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile" - } - }, - networkProfile: { - serializedName: "properties.networkProfile", - type: { - name: "Composite", - className: "NetworkProfile" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - guestAgentProfile: { - serializedName: "properties.guestAgentProfile", - type: { - name: "Composite", - className: "GuestAgentProfile" - } - }, - securityProfile: { - serializedName: "properties.securityProfile", - type: { - name: "Composite", - className: "SecurityProfile" - } - }, - moRefId: { - serializedName: "properties.moRefId", - type: { - name: "String" - } - }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", - type: { - name: "String" - } - }, - moName: { - serializedName: "properties.moName", - readOnly: true, - type: { - name: "String" - } - }, - folderPath: { - serializedName: "properties.folderPath", - readOnly: true, - type: { - name: "String" - } - }, - instanceUuid: { - serializedName: "properties.instanceUuid", - readOnly: true, - type: { - name: "String" - } - }, - smbiosUuid: { - serializedName: "properties.smbiosUuid", - type: { - name: "String" - } - }, - firmwareType: { - serializedName: "properties.firmwareType", - type: { - name: "String" - } - }, - powerState: { - serializedName: "properties.powerState", - readOnly: true, - type: { - name: "String" - } - }, - customResourceName: { - serializedName: "properties.customResourceName", - readOnly: true, - type: { - name: "String" - } - }, - uuid: { - serializedName: "properties.uuid", - readOnly: true, - type: { - name: "String" - } - }, - statuses: { - serializedName: "properties.statuses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceStatus" - } - } - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - vmId: { - serializedName: "properties.vmId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PlacementProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementProfile", - modelProperties: { - resourcePoolId: { - serializedName: "resourcePoolId", - type: { - name: "String" - } - }, - clusterId: { - serializedName: "clusterId", - type: { - name: "String" - } - }, - hostId: { - serializedName: "hostId", - type: { - name: "String" - } - }, - datastoreId: { - serializedName: "datastoreId", - type: { - name: "String" - } - } - } - } -}; - -export const OsProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfile", - modelProperties: { - computerName: { - serializedName: "computerName", - type: { - name: "String" - } - }, - adminUsername: { - serializedName: "adminUsername", - type: { - name: "String" - } - }, - adminPassword: { - serializedName: "adminPassword", - type: { - name: "String" - } - }, - guestId: { - serializedName: "guestId", - type: { - name: "String" - } - }, - allowExtensionOperations: { - serializedName: "allowExtensionOperations", - readOnly: true, - type: { - name: "Boolean" - } - }, - osType: { - serializedName: "osType", - type: { - name: "String" - } - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String" - } - }, - toolsRunningStatus: { - serializedName: "toolsRunningStatus", - readOnly: true, - type: { - name: "String" - } - }, - toolsVersionStatus: { - serializedName: "toolsVersionStatus", - readOnly: true, - type: { - name: "String" - } - }, - toolsVersion: { - serializedName: "toolsVersion", - readOnly: true, - type: { - name: "String" - } - }, - windowsConfiguration: { - serializedName: "windowsConfiguration", - type: { - name: "Composite", - className: "OsProfileWindowsConfiguration" - } - }, - linuxConfiguration: { - serializedName: "linuxConfiguration", - type: { - name: "Composite", - className: "OsProfileLinuxConfiguration" - } - } - } - } -}; - -export const OsProfileWindowsConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileWindowsConfiguration", - modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", - type: { - name: "String" - } - }, - patchMode: { - serializedName: "patchSettings.patchMode", - type: { - name: "String" - } - } - } - } -}; - -export const OsProfileLinuxConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileLinuxConfiguration", - modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", - type: { - name: "String" - } - }, - patchMode: { - serializedName: "patchSettings.patchMode", - type: { - name: "String" - } - } - } - } -}; - -export const HardwareProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareProfile", - modelProperties: { - memorySizeMB: { - serializedName: "memorySizeMB", - type: { - name: "Number" - } - }, - numCPUs: { - serializedName: "numCPUs", - type: { - name: "Number" - } - }, - numCoresPerSocket: { - serializedName: "numCoresPerSocket", - type: { - name: "Number" - } - }, - cpuHotAddEnabled: { - serializedName: "cpuHotAddEnabled", - readOnly: true, - type: { - name: "Boolean" - } - }, - cpuHotRemoveEnabled: { - serializedName: "cpuHotRemoveEnabled", - readOnly: true, - type: { - name: "Boolean" - } - }, - memoryHotAddEnabled: { - serializedName: "memoryHotAddEnabled", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const NetworkProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfile", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface" - } - } - } - } - } - } -}; - -export const NetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterface", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - label: { - serializedName: "label", - readOnly: true, - type: { - name: "String" - } - }, - ipAddresses: { - serializedName: "ipAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String" - } - }, - networkId: { - serializedName: "networkId", - type: { - name: "String" - } - }, - nicType: { - serializedName: "nicType", - type: { - name: "String" - } - }, - powerOnBoot: { - serializedName: "powerOnBoot", - type: { - name: "String" - } - }, - networkMoRefId: { - serializedName: "networkMoRefId", - readOnly: true, - type: { - name: "String" - } - }, - networkMoName: { - serializedName: "networkMoName", - readOnly: true, - type: { - name: "String" - } - }, - deviceKey: { - serializedName: "deviceKey", - type: { - name: "Number" - } - }, - ipSettings: { - serializedName: "ipSettings", - type: { - name: "Composite", - className: "NicIPSettings" - } - } - } - } -}; - -export const NicIPSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NicIPSettings", - modelProperties: { - allocationMethod: { - serializedName: "allocationMethod", - type: { - name: "String" - } - }, - dnsServers: { - serializedName: "dnsServers", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - gateway: { - serializedName: "gateway", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String" - } - }, - subnetMask: { - serializedName: "subnetMask", - type: { - name: "String" - } - }, - primaryWinsServer: { - serializedName: "primaryWinsServer", - readOnly: true, - type: { - name: "String" - } - }, - secondaryWinsServer: { - serializedName: "secondaryWinsServer", - readOnly: true, - type: { - name: "String" - } - }, - ipAddressInfo: { - serializedName: "ipAddressInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NicIPAddressSettings" - } - } - } - } - } - } -}; - -export const NicIPAddressSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NicIPAddressSettings", - modelProperties: { - allocationMethod: { - serializedName: "allocationMethod", - readOnly: true, - type: { - name: "String" - } - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String" - } - }, - subnetMask: { - serializedName: "subnetMask", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const StorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageProfile", - modelProperties: { - disks: { - serializedName: "disks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualDisk" - } - } - } - }, - scsiControllers: { - serializedName: "scsiControllers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualScsiController" - } - } - } - } - } - } -}; - -export const VirtualDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualDisk", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - label: { - serializedName: "label", - readOnly: true, - type: { - name: "String" - } - }, - diskObjectId: { - serializedName: "diskObjectId", - readOnly: true, - type: { - name: "String" - } - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number" - } - }, - deviceKey: { - serializedName: "deviceKey", - type: { - name: "Number" - } - }, - diskMode: { - serializedName: "diskMode", - type: { - name: "String" - } - }, - controllerKey: { - serializedName: "controllerKey", - type: { - name: "Number" - } - }, - unitNumber: { - serializedName: "unitNumber", - type: { - name: "Number" - } - }, - deviceName: { - serializedName: "deviceName", - type: { - name: "String" - } - }, - diskType: { - serializedName: "diskType", - type: { - name: "String" - } - } - } - } -}; - -export const VirtualScsiController: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualScsiController", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - controllerKey: { - serializedName: "controllerKey", - type: { - name: "Number" - } - }, - busNumber: { - serializedName: "busNumber", - type: { - name: "Number" - } - }, - scsiCtlrUnitNumber: { - serializedName: "scsiCtlrUnitNumber", - type: { - name: "Number" - } - }, - sharing: { - serializedName: "sharing", - type: { - name: "String" - } - } - } - } -}; - -export const GuestAgentProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GuestAgentProfile", - modelProperties: { - vmUuid: { - serializedName: "vmUuid", - readOnly: true, - type: { - name: "String" - } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String" - } - }, - lastStatusChange: { - serializedName: "lastStatusChange", - readOnly: true, - type: { - name: "DateTime" - } - }, - agentVersion: { - serializedName: "agentVersion", - readOnly: true, - type: { - name: "String" - } - }, - errorDetails: { - serializedName: "errorDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } - } - } -}; - -export const SecurityProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityProfile", - modelProperties: { - uefiSettings: { - serializedName: "uefiSettings", - type: { - name: "Composite", - className: "UefiSettings" - } - } - } - } -}; - -export const UefiSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UefiSettings", - modelProperties: { - secureBootEnabled: { - serializedName: "secureBootEnabled", - type: { - name: "Boolean" - } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, + ipSettings: { + serializedName: "ipSettings", type: { - name: "String" + name: "Composite", + className: "NicIPSettings" } } } } }; -export const VirtualMachineUpdate: coreClient.CompositeMapper = { +export const NicIPSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineUpdate", + className: "NicIPSettings", modelProperties: { - tags: { - serializedName: "tags", + allocationMethod: { + serializedName: "allocationMethod", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - identity: { - serializedName: "identity", + dnsServers: { + serializedName: "dnsServers", type: { - name: "Composite", - className: "Identity" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", + gateway: { + serializedName: "gateway", type: { - name: "Composite", - className: "HardwareProfile" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - osProfile: { - serializedName: "properties.osProfile", + ipAddress: { + serializedName: "ipAddress", type: { - name: "Composite", - className: "OsProfileUpdate" + name: "String" } }, - storageProfile: { - serializedName: "properties.storageProfile", + subnetMask: { + serializedName: "subnetMask", type: { - name: "Composite", - className: "StorageProfileUpdate" + name: "String" } }, - networkProfile: { - serializedName: "properties.networkProfile", + primaryWinsServer: { + serializedName: "primaryWinsServer", + readOnly: true, type: { - name: "Composite", - className: "NetworkProfileUpdate" + name: "String" } - } - } - } -}; - -export const OsProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsProfileUpdate", - modelProperties: { - windowsConfiguration: { - serializedName: "windowsConfiguration", + }, + secondaryWinsServer: { + serializedName: "secondaryWinsServer", + readOnly: true, type: { - name: "Composite", - className: "OsProfileUpdateWindowsConfiguration" + name: "String" } }, - linuxConfiguration: { - serializedName: "linuxConfiguration", + ipAddressInfo: { + serializedName: "ipAddressInfo", + readOnly: true, type: { - name: "Composite", - className: "OsProfileUpdateLinuxConfiguration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NicIPAddressSettings" + } + } } } } } }; -export const OsProfileUpdateWindowsConfiguration: coreClient.CompositeMapper = { +export const NicIPAddressSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OsProfileUpdateWindowsConfiguration", + className: "NicIPAddressSettings", modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", + allocationMethod: { + serializedName: "allocationMethod", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + readOnly: true, type: { name: "String" } }, - patchMode: { - serializedName: "patchSettings.patchMode", + subnetMask: { + serializedName: "subnetMask", + readOnly: true, type: { name: "String" } @@ -2588,55 +1738,27 @@ export const OsProfileUpdateWindowsConfiguration: coreClient.CompositeMapper = { } }; -export const OsProfileUpdateLinuxConfiguration: coreClient.CompositeMapper = { +export const VirtualDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OsProfileUpdateLinuxConfiguration", + className: "VirtualDisk", modelProperties: { - assessmentMode: { - serializedName: "patchSettings.assessmentMode", + name: { + serializedName: "name", type: { name: "String" } }, - patchMode: { - serializedName: "patchSettings.patchMode", + label: { + serializedName: "label", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const StorageProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageProfileUpdate", - modelProperties: { - disks: { - serializedName: "disks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualDiskUpdate" - } - } - } - } - } - } -}; - -export const VirtualDiskUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualDiskUpdate", - modelProperties: { - name: { - serializedName: "name", + }, + diskObjectId: { + serializedName: "diskObjectId", + readOnly: true, type: { name: "String" } @@ -2687,86 +1809,10 @@ export const VirtualDiskUpdate: coreClient.CompositeMapper = { } }; -export const NetworkProfileUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfileUpdate", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceUpdate" - } - } - } - } - } - } -}; - -export const NetworkInterfaceUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceUpdate", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - networkId: { - serializedName: "networkId", - type: { - name: "String" - } - }, - nicType: { - serializedName: "nicType", - type: { - name: "String" - } - }, - powerOnBoot: { - serializedName: "powerOnBoot", - type: { - name: "String" - } - }, - deviceKey: { - serializedName: "deviceKey", - type: { - name: "Number" - } - } - } - } -}; - -export const StopVirtualMachineOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StopVirtualMachineOptions", - modelProperties: { - skipShutdown: { - defaultValue: false, - serializedName: "skipShutdown", - type: { - name: "Boolean" - } - } - } - } -}; - -export const VirtualMachinesList: coreClient.CompositeMapper = { +export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachinesList", + className: "VirtualMachineTemplatesList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -2782,7 +1828,7 @@ export const VirtualMachinesList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualMachine" + className: "VirtualMachineTemplate" } } } @@ -2791,10 +1837,10 @@ export const VirtualMachinesList: coreClient.CompositeMapper = { } }; -export const VirtualMachineTemplate: coreClient.CompositeMapper = { +export const VirtualNetwork: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplate", + className: "VirtualNetwork", modelProperties: { location: { serializedName: "location", @@ -2861,152 +1907,174 @@ export const VirtualMachineTemplate: coreClient.CompositeMapper = { vCenterId: { serializedName: "properties.vCenterId", type: { - name: "String" - } - }, - moRefId: { - serializedName: "properties.moRefId", - type: { - name: "String" - } - }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", - type: { - name: "String" - } - }, - moName: { - serializedName: "properties.moName", - readOnly: true, - type: { - name: "String" - } - }, - memorySizeMB: { - serializedName: "properties.memorySizeMB", - readOnly: true, - type: { - name: "Number" - } - }, - numCPUs: { - serializedName: "properties.numCPUs", - readOnly: true, - type: { - name: "Number" + name: "String" } }, - numCoresPerSocket: { - serializedName: "properties.numCoresPerSocket", - readOnly: true, + moRefId: { + serializedName: "properties.moRefId", type: { - name: "Number" + name: "String" } }, - osType: { - serializedName: "properties.osType", - readOnly: true, + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { name: "String" } }, - osName: { - serializedName: "properties.osName", + moName: { + serializedName: "properties.moName", readOnly: true, type: { name: "String" } }, - folderPath: { - serializedName: "properties.folderPath", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, - networkInterfaces: { - serializedName: "properties.networkInterfaces", + statuses: { + serializedName: "properties.statuses", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "NetworkInterface" + className: "ResourceStatus" } } } }, - disks: { - serializedName: "properties.disks", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualDisk" + className: "VirtualNetwork" } } } + } + } + } +}; + +export const InventoryItemProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InventoryItemProperties", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: { + serializedName: "inventoryType", + clientName: "inventoryType" + }, + modelProperties: { + inventoryType: { + serializedName: "inventoryType", + required: true, + type: { + name: "String" + } }, - customResourceName: { - serializedName: "properties.customResourceName", - readOnly: true, + managedResourceId: { + serializedName: "managedResourceId", type: { name: "String" } }, - toolsVersionStatus: { - serializedName: "properties.toolsVersionStatus", - readOnly: true, + moRefId: { + serializedName: "moRefId", type: { name: "String" } }, - toolsVersion: { - serializedName: "properties.toolsVersion", - readOnly: true, + moName: { + serializedName: "moName", type: { name: "String" } }, - firmwareType: { - serializedName: "properties.firmwareType", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - statuses: { - serializedName: "properties.statuses", + name: { + serializedName: "name", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceStatus" - } - } + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { +export const InventoryItemsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplatesList", + className: "InventoryItemsList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -3022,7 +2090,7 @@ export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualMachineTemplate" + className: "InventoryItem" } } } @@ -3031,149 +2099,201 @@ export const VirtualMachineTemplatesList: coreClient.CompositeMapper = { } }; -export const VirtualNetwork: coreClient.CompositeMapper = { +export const PlacementProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetwork", + className: "PlacementProfile", modelProperties: { - location: { - serializedName: "location", - required: true, + resourcePoolId: { + serializedName: "resourcePoolId", type: { name: "String" } }, - extendedLocation: { - serializedName: "extendedLocation", + clusterId: { + serializedName: "clusterId", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } }, - systemData: { - serializedName: "systemData", + hostId: { + serializedName: "hostId", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - tags: { - serializedName: "tags", + datastoreId: { + serializedName: "datastoreId", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + } + } + } +}; + +export const OsProfileForVMInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsProfileForVMInstance", + modelProperties: { + computerName: { + serializedName: "computerName", + type: { + name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + adminUsername: { + serializedName: "adminUsername", type: { name: "String" } }, - id: { - serializedName: "id", - readOnly: true, + adminPassword: { + serializedName: "adminPassword", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + guestId: { + serializedName: "guestId", type: { name: "String" } }, - kind: { - serializedName: "kind", + osType: { + serializedName: "osType", type: { name: "String" } }, - uuid: { - serializedName: "properties.uuid", + osSku: { + serializedName: "osSku", readOnly: true, type: { name: "String" } }, - vCenterId: { - serializedName: "properties.vCenterId", + toolsRunningStatus: { + serializedName: "toolsRunningStatus", + readOnly: true, type: { name: "String" } }, - moRefId: { - serializedName: "properties.moRefId", + toolsVersionStatus: { + serializedName: "toolsVersionStatus", + readOnly: true, type: { name: "String" } }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", + toolsVersion: { + serializedName: "toolsVersion", + readOnly: true, type: { name: "String" } + } + } + } +}; + +export const HardwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HardwareProfile", + modelProperties: { + memorySizeMB: { + serializedName: "memorySizeMB", + type: { + name: "Number" + } }, - moName: { - serializedName: "properties.moName", + numCPUs: { + serializedName: "numCPUs", + type: { + name: "Number" + } + }, + numCoresPerSocket: { + serializedName: "numCoresPerSocket", + type: { + name: "Number" + } + }, + cpuHotAddEnabled: { + serializedName: "cpuHotAddEnabled", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - customResourceName: { - serializedName: "properties.customResourceName", + cpuHotRemoveEnabled: { + serializedName: "cpuHotRemoveEnabled", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - statuses: { - serializedName: "properties.statuses", + memoryHotAddEnabled: { + serializedName: "memoryHotAddEnabled", readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const NetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceStatus" + className: "NetworkInterface" } } } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } } } } }; -export const VirtualNetworksList: coreClient.CompositeMapper = { +export const StorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworksList", + className: "StorageProfile", modelProperties: { - nextLink: { - serializedName: "nextLink", + disks: { + serializedName: "disks", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } } }, - value: { - serializedName: "value", - required: true, + scsiControllers: { + serializedName: "scsiControllers", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualNetwork" + className: "VirtualScsiController" } } } @@ -3182,44 +2302,37 @@ export const VirtualNetworksList: coreClient.CompositeMapper = { } }; -export const InventoryItemProperties: coreClient.CompositeMapper = { +export const VirtualScsiController: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemProperties", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: { - serializedName: "inventoryType", - clientName: "inventoryType" - }, + className: "VirtualScsiController", modelProperties: { - inventoryType: { - serializedName: "inventoryType", - required: true, + type: { + serializedName: "type", type: { name: "String" } }, - managedResourceId: { - serializedName: "managedResourceId", + controllerKey: { + serializedName: "controllerKey", type: { - name: "String" + name: "Number" } }, - moRefId: { - serializedName: "moRefId", + busNumber: { + serializedName: "busNumber", type: { - name: "String" + name: "Number" } }, - moName: { - serializedName: "moName", + scsiCtlrUnitNumber: { + serializedName: "scsiCtlrUnitNumber", type: { - name: "String" + name: "Number" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + sharing: { + serializedName: "sharing", type: { name: "String" } @@ -3228,309 +2341,346 @@ export const InventoryItemProperties: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const SecurityProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "SecurityProfile", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, + uefiSettings: { + serializedName: "uefiSettings", type: { - name: "String" + name: "Composite", + className: "UefiSettings" } } } } }; -export const InventoryItemsList: coreClient.CompositeMapper = { +export const UefiSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemsList", + className: "UefiSettings", modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, + secureBootEnabled: { + serializedName: "secureBootEnabled", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InventoryItem" - } - } + name: "Boolean" } } } } }; -export const HybridIdentityMetadataList: coreClient.CompositeMapper = { +export const InfrastructureProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridIdentityMetadataList", + className: "InfrastructureProfile", modelProperties: { - nextLink: { - serializedName: "nextLink", + templateId: { + serializedName: "templateId", type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + vCenterId: { + serializedName: "vCenterId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HybridIdentityMetadata" - } - } + name: "String" } - } - } - } -}; - -export const MachineExtension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtension", - modelProperties: { - location: { - serializedName: "location", + }, + moRefId: { + serializedName: "moRefId", + readOnly: true, type: { name: "String" } }, - systemData: { - serializedName: "systemData", + inventoryItemId: { + serializedName: "inventoryItemId", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - tags: { - serializedName: "tags", + moName: { + serializedName: "moName", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - name: { - serializedName: "name", + folderPath: { + serializedName: "folderPath", readOnly: true, type: { name: "String" } }, - id: { - serializedName: "id", + instanceUuid: { + serializedName: "instanceUuid", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + smbiosUuid: { + serializedName: "smbiosUuid", + type: { + name: "String" + } + }, + firmwareType: { + serializedName: "firmwareType", + type: { + name: "String" + } + }, + customResourceName: { + serializedName: "customResourceName", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const VirtualMachineInstanceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceUpdate", + modelProperties: { + hardwareProfile: { + serializedName: "properties.hardwareProfile", + type: { + name: "Composite", + className: "HardwareProfile" + } + }, + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "StorageProfileUpdate" + } }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfileUpdate" + } + } + } + } +}; + +export const StorageProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageProfileUpdate", + modelProperties: { + disks: { + serializedName: "disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDiskUpdate" + } + } + } + } + } + } +}; + +export const VirtualDiskUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualDiskUpdate", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - publisher: { - serializedName: "properties.publisher", + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "String" + name: "Number" } }, - typePropertiesType: { - serializedName: "properties.type", + deviceKey: { + serializedName: "deviceKey", type: { - name: "String" + name: "Number" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + diskMode: { + serializedName: "diskMode", type: { name: "String" } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean" - } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + controllerKey: { + serializedName: "controllerKey", type: { - name: "Boolean" + name: "Number" } }, - settings: { - serializedName: "properties.settings", + unitNumber: { + serializedName: "unitNumber", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } }, - protectedSettings: { - serializedName: "properties.protectedSettings", + deviceName: { + serializedName: "deviceName", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + diskType: { + serializedName: "diskType", type: { name: "String" } - }, - instanceView: { - serializedName: "properties.instanceView", + } + } + } +}; + +export const NetworkProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileUpdate", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", type: { - name: "Composite", - className: "MachineExtensionPropertiesInstanceView" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterfaceUpdate" + } + } } } } } }; -export const MachineExtensionInstanceView: coreClient.CompositeMapper = { +export const NetworkInterfaceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionInstanceView", + className: "NetworkInterfaceUpdate", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + networkId: { + serializedName: "networkId", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", - readOnly: true, + nicType: { + serializedName: "nicType", type: { name: "String" } }, - status: { - serializedName: "status", + powerOnBoot: { + serializedName: "powerOnBoot", type: { - name: "Composite", - className: "MachineExtensionInstanceViewStatus" + name: "String" + } + }, + deviceKey: { + serializedName: "deviceKey", + type: { + name: "Number" } } } } }; -export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { +export const VirtualMachineInstancesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionInstanceViewStatus", + className: "VirtualMachineInstancesList", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - level: { - serializedName: "level", - readOnly: true, - type: { - name: "String" - } - }, - displayStatus: { - serializedName: "displayStatus", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineInstance" + } + } } - }, - time: { - serializedName: "time", - readOnly: true, + } + } + } +}; + +export const StopVirtualMachineOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StopVirtualMachineOptions", + modelProperties: { + skipShutdown: { + defaultValue: false, + serializedName: "skipShutdown", type: { - name: "DateTime" + name: "Boolean" } } } } }; -export const MachineExtensionsListResult: coreClient.CompositeMapper = { +export const VmInstanceHybridIdentityMetadataList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionsListResult", + className: "VmInstanceHybridIdentityMetadataList", modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtension" + className: "VmInstanceHybridIdentityMetadata" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } @@ -3653,66 +2803,12 @@ export const InventoryItemDetails: coreClient.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const MachineExtensionUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtensionUpdate", - modelProperties: { - ...ResourcePatch.type.modelProperties, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "properties.publisher", - type: { - name: "String" - } - }, - type: { - serializedName: "properties.type", - type: { - name: "String" - } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + inventoryType: { + serializedName: "inventoryType", type: { name: "String" } - }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean" - } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "properties.settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "properties.protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } } } } @@ -3792,6 +2888,13 @@ export const VirtualMachineInventoryItem: coreClient.CompositeMapper = { className: "InventoryItemDetails" } }, + cluster: { + serializedName: "cluster", + type: { + name: "Composite", + className: "InventoryItemDetails" + } + }, instanceUuid: { serializedName: "instanceUuid", type: { @@ -3876,6 +2979,20 @@ export const VirtualMachineTemplateInventoryItem: coreClient.CompositeMapper = { name: "String" } }, + toolsVersionStatus: { + serializedName: "toolsVersionStatus", + readOnly: true, + type: { + name: "String" + } + }, + toolsVersion: { + serializedName: "toolsVersion", + readOnly: true, + type: { + name: "String" + } + }, folderPath: { serializedName: "folderPath", type: { @@ -3971,86 +3088,162 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; -export const MachineExtensionPropertiesInstanceView: coreClient.CompositeMapper = { +export const InventoryItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionPropertiesInstanceView", + className: "InventoryItem", modelProperties: { - ...MachineExtensionInstanceView.type.modelProperties + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + inventoryType: { + serializedName: "properties.inventoryType", + required: true, + type: { + name: "String" + } + }, + managedResourceId: { + serializedName: "properties.managedResourceId", + type: { + name: "String" + } + }, + moRefId: { + serializedName: "properties.moRefId", + type: { + name: "String" + } + }, + moName: { + serializedName: "properties.moName", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const InventoryItem: coreClient.CompositeMapper = { +export const VirtualMachineInstance: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItem", + className: "VirtualMachineInstance", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + placementProfile: { + serializedName: "properties.placementProfile", type: { name: "Composite", - className: "SystemData" + className: "PlacementProfile" } }, - kind: { - serializedName: "kind", + osProfile: { + serializedName: "properties.osProfile", type: { - name: "String" + name: "Composite", + className: "OsProfileForVMInstance" } }, - inventoryType: { - serializedName: "properties.inventoryType", - required: true, + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { - name: "String" + name: "Composite", + className: "HardwareProfile" } }, - managedResourceId: { - serializedName: "properties.managedResourceId", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "String" + name: "Composite", + className: "NetworkProfile" } }, - moRefId: { - serializedName: "properties.moRefId", + storageProfile: { + serializedName: "properties.storageProfile", type: { - name: "String" + name: "Composite", + className: "StorageProfile" } }, - moName: { - serializedName: "properties.moName", + securityProfile: { + serializedName: "properties.securityProfile", + type: { + name: "Composite", + className: "SecurityProfile" + } + }, + infrastructureProfile: { + serializedName: "properties.infrastructureProfile", + type: { + name: "Composite", + className: "InfrastructureProfile" + } + }, + powerState: { + serializedName: "properties.powerState", + readOnly: true, type: { name: "String" } }, + statuses: { + serializedName: "properties.statuses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceStatus" + } + } + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } + }, + resourceUid: { + serializedName: "properties.resourceUid", + readOnly: true, + type: { + name: "String" + } } } } }; -export const HybridIdentityMetadata: coreClient.CompositeMapper = { +export const VmInstanceHybridIdentityMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridIdentityMetadata", + className: "VmInstanceHybridIdentityMetadata", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - vmId: { - serializedName: "properties.vmId", + resourceUid: { + serializedName: "properties.resourceUid", type: { name: "String" } @@ -4061,13 +3254,6 @@ export const HybridIdentityMetadata: coreClient.CompositeMapper = { name: "String" } }, - identity: { - serializedName: "properties.identity", - type: { - name: "Composite", - className: "Identity" - } - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -4085,13 +3271,6 @@ export const GuestAgent: coreClient.CompositeMapper = { className: "GuestAgent", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, uuid: { serializedName: "properties.uuid", readOnly: true, @@ -4106,6 +3285,12 @@ export const GuestAgent: coreClient.CompositeMapper = { className: "GuestCredential" } }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" + } + }, httpProxyConfig: { serializedName: "properties.httpProxyConfig", type: { @@ -4157,6 +3342,201 @@ export const GuestAgent: coreClient.CompositeMapper = { } }; +export const ResourcePoolsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourcePoolsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const HostsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DatastoresDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatastoresDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VCentersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VCentersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineTemplatesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineTemplatesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualNetworksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstancesRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesRestartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VMInstanceGuestAgentsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMInstanceGuestAgentsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { InventoryItemProperties: InventoryItemProperties, "InventoryItemProperties.ResourcePool": ResourcePoolInventoryItem, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts b/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts index 5aa8366991c1..bddd680571b7 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/models/parameters.ts @@ -12,10 +12,6 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - VirtualMachineInstallPatchesParameters as VirtualMachineInstallPatchesParametersMapper, - VirtualMachine as VirtualMachineMapper, - VirtualMachineUpdate as VirtualMachineUpdateMapper, - StopVirtualMachineOptions as StopVirtualMachineOptionsMapper, ResourcePool as ResourcePoolMapper, ResourcePatch as ResourcePatchMapper, Cluster as ClusterMapper, @@ -25,9 +21,9 @@ import { VirtualMachineTemplate as VirtualMachineTemplateMapper, VirtualNetwork as VirtualNetworkMapper, InventoryItem as InventoryItemMapper, - HybridIdentityMetadata as HybridIdentityMetadataMapper, - MachineExtension as MachineExtensionMapper, - MachineExtensionUpdate as MachineExtensionUpdateMapper, + VirtualMachineInstance as VirtualMachineInstanceMapper, + VirtualMachineInstanceUpdate as VirtualMachineInstanceUpdateMapper, + StopVirtualMachineOptions as StopVirtualMachineOptionsMapper, GuestAgent as GuestAgentMapper } from "../models/mappers"; @@ -58,7 +54,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-01-10-preview", + defaultValue: "2023-10-01", isConstant: true, serializedName: "api-version", type: { @@ -79,32 +75,27 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - serializedName: "subscriptionId", - required: true, + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - serializedName: "resourceGroupName", - required: true, - type: { - name: "String" - } - } +export const body: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ResourcePoolMapper }; -export const name: OperationURLParameter = { - parameterPath: "name", +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "name", + serializedName: "subscriptionId", required: true, type: { name: "String" @@ -112,32 +103,21 @@ export const name: OperationURLParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", + serializedName: "resourceGroupName", + required: true, type: { name: "String" } } }; -export const installPatchesInput: OperationParameter = { - parameterPath: "installPatchesInput", - mapper: VirtualMachineInstallPatchesParametersMapper -}; - -export const body: OperationParameter = { - parameterPath: ["options", "body"], - mapper: VirtualMachineMapper -}; - -export const virtualMachineName: OperationURLParameter = { - parameterPath: "virtualMachineName", +export const resourcePoolName: OperationURLParameter = { + parameterPath: "resourcePoolName", mapper: { - serializedName: "virtualMachineName", + serializedName: "resourcePoolName", required: true, type: { name: "String" @@ -147,7 +127,7 @@ export const virtualMachineName: OperationURLParameter = { export const body1: OperationParameter = { parameterPath: ["options", "body"], - mapper: VirtualMachineUpdateMapper + mapper: ResourcePatchMapper }; export const force: OperationQueryParameter = { @@ -160,43 +140,7 @@ export const force: OperationQueryParameter = { } }; -export const retain: OperationQueryParameter = { - parameterPath: ["options", "retain"], - mapper: { - serializedName: "retain", - type: { - name: "Boolean" - } - } -}; - export const body2: OperationParameter = { - parameterPath: ["options", "body"], - mapper: StopVirtualMachineOptionsMapper -}; - -export const body3: OperationParameter = { - parameterPath: ["options", "body"], - mapper: ResourcePoolMapper -}; - -export const resourcePoolName: OperationURLParameter = { - parameterPath: "resourcePoolName", - mapper: { - serializedName: "resourcePoolName", - required: true, - type: { - name: "String" - } - } -}; - -export const body4: OperationParameter = { - parameterPath: ["options", "body"], - mapper: ResourcePatchMapper -}; - -export const body5: OperationParameter = { parameterPath: ["options", "body"], mapper: ClusterMapper }; @@ -212,7 +156,7 @@ export const clusterName: OperationURLParameter = { } }; -export const body6: OperationParameter = { +export const body3: OperationParameter = { parameterPath: ["options", "body"], mapper: HostMapper }; @@ -228,7 +172,7 @@ export const hostName: OperationURLParameter = { } }; -export const body7: OperationParameter = { +export const body4: OperationParameter = { parameterPath: ["options", "body"], mapper: DatastoreMapper }; @@ -244,7 +188,7 @@ export const datastoreName: OperationURLParameter = { } }; -export const body8: OperationParameter = { +export const body5: OperationParameter = { parameterPath: ["options", "body"], mapper: VCenterMapper }; @@ -260,7 +204,7 @@ export const vcenterName: OperationURLParameter = { } }; -export const body9: OperationParameter = { +export const body6: OperationParameter = { parameterPath: ["options", "body"], mapper: VirtualMachineTemplateMapper }; @@ -276,7 +220,7 @@ export const virtualMachineTemplateName: OperationURLParameter = { } }; -export const body10: OperationParameter = { +export const body7: OperationParameter = { parameterPath: ["options", "body"], mapper: VirtualNetworkMapper }; @@ -292,7 +236,7 @@ export const virtualNetworkName: OperationURLParameter = { } }; -export const body11: OperationParameter = { +export const body8: OperationParameter = { parameterPath: ["options", "body"], mapper: InventoryItemMapper }; @@ -308,54 +252,44 @@ export const inventoryItemName: OperationURLParameter = { } }; -export const body12: OperationParameter = { +export const body9: OperationParameter = { parameterPath: ["options", "body"], - mapper: HybridIdentityMetadataMapper + mapper: VirtualMachineInstanceMapper }; -export const metadataName: OperationURLParameter = { - parameterPath: "metadataName", +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", mapper: { - serializedName: "metadataName", + serializedName: "resourceUri", required: true, type: { name: "String" } - } + }, + skipEncoding: true }; -export const extensionParameters: OperationParameter = { - parameterPath: "extensionParameters", - mapper: MachineExtensionMapper +export const body10: OperationParameter = { + parameterPath: ["options", "body"], + mapper: VirtualMachineInstanceUpdateMapper }; -export const extensionName: OperationURLParameter = { - parameterPath: "extensionName", +export const deleteFromHost: OperationQueryParameter = { + parameterPath: ["options", "deleteFromHost"], mapper: { - serializedName: "extensionName", - required: true, + serializedName: "deleteFromHost", type: { - name: "String" + name: "Boolean" } } }; -export const extensionParameters1: OperationParameter = { - parameterPath: "extensionParameters", - mapper: MachineExtensionUpdateMapper -}; - -export const expand: OperationQueryParameter = { - parameterPath: ["options", "expand"], - mapper: { - serializedName: "$expand", - type: { - name: "String" - } - } +export const body11: OperationParameter = { + parameterPath: ["options", "body"], + mapper: StopVirtualMachineOptionsMapper }; -export const body13: OperationParameter = { +export const body12: OperationParameter = { parameterPath: ["options", "body"], mapper: GuestAgentMapper }; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts index b23619904dca..de8f996b5244 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/clusters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Cluster, ClustersListNextOptionalParams, @@ -181,8 +185,8 @@ export class ClustersImpl implements Clusters { clusterName: string, options?: ClustersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateResponse > > { @@ -192,7 +196,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body5, + requestBody: Parameters.body2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts index 543e48b36310..87c124e3e954 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/datastores.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Datastore, DatastoresListNextOptionalParams, @@ -181,8 +185,8 @@ export class DatastoresImpl implements Datastores { datastoreName: string, options?: DatastoresCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatastoresCreateResponse > > { @@ -192,7 +196,7 @@ export class DatastoresImpl implements Datastores { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class DatastoresImpl implements Datastores { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, datastoreName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, datastoreName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + DatastoresCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class DatastoresImpl implements Datastores { resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class DatastoresImpl implements Datastores { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, datastoreName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, datastoreName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body7, + requestBody: Parameters.body4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts index d191cc7f8c2e..5161c0c87142 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/hosts.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Host, HostsListNextOptionalParams, @@ -181,7 +185,7 @@ export class HostsImpl implements Hosts { hostName: string, options?: HostsCreateOptionalParams ): Promise< - PollerLike, HostsCreateResponse> + SimplePollerLike, HostsCreateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -189,7 +193,7 @@ export class HostsImpl implements Hosts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -222,15 +226,18 @@ export class HostsImpl implements Hosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + HostsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -295,14 +302,14 @@ export class HostsImpl implements Hosts { resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -335,13 +342,13 @@ export class HostsImpl implements Hosts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, hostName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -442,7 +449,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body6, + requestBody: Parameters.body3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -488,7 +495,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts deleted file mode 100644 index 22193589fe04..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/hybridIdentityMetadataOperations.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { HybridIdentityMetadataOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { - HybridIdentityMetadata, - HybridIdentityMetadataListByVmNextOptionalParams, - HybridIdentityMetadataListByVmOptionalParams, - HybridIdentityMetadataListByVmResponse, - HybridIdentityMetadataCreateOptionalParams, - HybridIdentityMetadataCreateResponse, - HybridIdentityMetadataGetOptionalParams, - HybridIdentityMetadataGetResponse, - HybridIdentityMetadataDeleteOptionalParams, - HybridIdentityMetadataListByVmNextResponse -} from "../models"; - -/// -/** Class containing HybridIdentityMetadataOperations operations. */ -export class HybridIdentityMetadataOperationsImpl - implements HybridIdentityMetadataOperations { - private readonly client: AzureArcVMwareManagementServiceAPI; - - /** - * Initialize a new instance of the class HybridIdentityMetadataOperations class. - * @param client Reference to the service client - */ - constructor(client: AzureArcVMwareManagementServiceAPI) { - this.client = client; - } - - /** - * Returns the list of HybridIdentityMetadata of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - public listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByVmPagingAll( - resourceGroupName, - virtualMachineName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options, - settings - ); - } - }; - } - - private async *listByVmPagingPage( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: HybridIdentityMetadataListByVmResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVm( - resourceGroupName, - virtualMachineName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVmNext( - resourceGroupName, - virtualMachineName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVmPagingAll( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options - )) { - yield* page; - } - } - - /** - * Create Or Update HybridIdentityMetadata. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the hybridIdentityMetadata. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, metadataName, options }, - createOperationSpec - ); - } - - /** - * Implements HybridIdentityMetadata GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, metadataName, options }, - getOperationSpec - ); - } - - /** - * Implements HybridIdentityMetadata DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, metadataName, options }, - deleteOperationSpec - ); - } - - /** - * Returns the list of HybridIdentityMetadata of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - private _listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - listByVmOperationSpec - ); - } - - /** - * ListByVmNext - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param nextLink The nextLink from the previous successful call to the ListByVm method. - * @param options The options parameters. - */ - private _listByVmNext( - resourceGroupName: string, - virtualMachineName: string, - nextLink: string, - options?: HybridIdentityMetadataListByVmNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, nextLink, options }, - listByVmNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadata - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.metadataName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadata - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.metadataName - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.metadataName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByVmOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadataList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByVmNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HybridIdentityMetadataList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts index 5adaf861d073..6d0f6f8da9e9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/index.ts @@ -7,7 +7,6 @@ */ export * from "./operations"; -export * from "./virtualMachines"; export * from "./resourcePools"; export * from "./clusters"; export * from "./hosts"; @@ -16,6 +15,6 @@ export * from "./vCenters"; export * from "./virtualMachineTemplates"; export * from "./virtualNetworks"; export * from "./inventoryItems"; -export * from "./hybridIdentityMetadataOperations"; -export * from "./machineExtensions"; -export * from "./guestAgents"; +export * from "./virtualMachineInstances"; +export * from "./vmInstanceHybridIdentityMetadataOperations"; +export * from "./vMInstanceGuestAgents"; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts index 77985bb2bee1..dff6631b7437 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/inventoryItems.ts @@ -231,7 +231,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body11, + requestBody: Parameters.body8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts deleted file mode 100644 index 82b9cc99600a..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/machineExtensions.ts +++ /dev/null @@ -1,615 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { MachineExtensions } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - MachineExtension, - MachineExtensionsListNextOptionalParams, - MachineExtensionsListOptionalParams, - MachineExtensionsListResponse, - MachineExtensionsCreateOrUpdateOptionalParams, - MachineExtensionsCreateOrUpdateResponse, - MachineExtensionUpdate, - MachineExtensionsUpdateOptionalParams, - MachineExtensionsUpdateResponse, - MachineExtensionsDeleteOptionalParams, - MachineExtensionsGetOptionalParams, - MachineExtensionsGetResponse, - MachineExtensionsListNextResponse -} from "../models"; - -/// -/** Class containing MachineExtensions operations. */ -export class MachineExtensionsImpl implements MachineExtensions { - private readonly client: AzureArcVMwareManagementServiceAPI; - - /** - * Initialize a new instance of the class MachineExtensions class. - * @param client Reference to the service client - */ - constructor(client: AzureArcVMwareManagementServiceAPI) { - this.client = client; - } - - /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, name, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, name, options, settings); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: MachineExtensionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, name, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - name, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - name, - options - )) { - yield* page; - } - } - - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsCreateOrUpdateResponse - > - > { - 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, name, extensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - name, - extensionName, - extensionParameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsUpdateResponse - > - > { - 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, name, extensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - name, - extensionName, - extensionParameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): 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, name, extensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - name, - extensionName, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to get the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, extensionName, options }, - getOperationSpec - ); - } - - /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - name: string, - nextLink: string, - options?: MachineExtensionsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, name, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, - 201: { - bodyMapper: Mappers.MachineExtension - }, - 202: { - bodyMapper: Mappers.MachineExtension - }, - 204: { - bodyMapper: Mappers.MachineExtension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.extensionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, - 201: { - bodyMapper: Mappers.MachineExtension - }, - 202: { - bodyMapper: Mappers.MachineExtension - }, - 204: { - bodyMapper: Mappers.MachineExtension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.extensionParameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineExtensionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineExtensionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts index 6110b916818c..da9f72cc022e 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/resourcePools.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ResourcePool, ResourcePoolsListNextOptionalParams, @@ -181,8 +185,8 @@ export class ResourcePoolsImpl implements ResourcePools { resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ResourcePoolsCreateResponse > > { @@ -192,7 +196,7 @@ export class ResourcePoolsImpl implements ResourcePools { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class ResourcePoolsImpl implements ResourcePools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourcePoolName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourcePoolName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ResourcePoolsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class ResourcePoolsImpl implements ResourcePools { resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class ResourcePoolsImpl implements ResourcePools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourcePoolName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourcePoolName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body3, + requestBody: Parameters.body, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts index ef32d63e04fa..d3b5b1030e77 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/vCenters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VCenter, VCentersListNextOptionalParams, @@ -181,8 +185,8 @@ export class VCentersImpl implements VCenters { vcenterName: string, options?: VCentersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VCentersCreateResponse > > { @@ -192,7 +196,7 @@ export class VCentersImpl implements VCenters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class VCentersImpl implements VCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vcenterName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vcenterName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VCentersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class VCentersImpl implements VCenters { resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class VCentersImpl implements VCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vcenterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vcenterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body8, + requestBody: Parameters.body5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/guestAgents.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/vMInstanceGuestAgents.ts similarity index 51% rename from sdk/connectedvmware/arm-connectedvmware/src/operations/guestAgents.ts rename to sdk/connectedvmware/arm-connectedvmware/src/operations/vMInstanceGuestAgents.ts index 5afb43fd2e45..2ca59f4a37ab 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/guestAgents.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/vMInstanceGuestAgents.ts @@ -8,33 +8,38 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { GuestAgents } from "../operationsInterfaces"; +import { VMInstanceGuestAgents } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { GuestAgent, - GuestAgentsListByVmNextOptionalParams, - GuestAgentsListByVmOptionalParams, - GuestAgentsListByVmResponse, - GuestAgentsCreateOptionalParams, - GuestAgentsCreateResponse, - GuestAgentsGetOptionalParams, - GuestAgentsGetResponse, - GuestAgentsDeleteOptionalParams, - GuestAgentsListByVmNextResponse + VMInstanceGuestAgentsListNextOptionalParams, + VMInstanceGuestAgentsListOptionalParams, + VMInstanceGuestAgentsListResponse, + VMInstanceGuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateResponse, + VMInstanceGuestAgentsGetOptionalParams, + VMInstanceGuestAgentsGetResponse, + VMInstanceGuestAgentsDeleteOptionalParams, + VMInstanceGuestAgentsDeleteResponse, + VMInstanceGuestAgentsListNextResponse } from "../models"; /// -/** Class containing GuestAgents operations. */ -export class GuestAgentsImpl implements GuestAgents { +/** Class containing VMInstanceGuestAgents operations. */ +export class VMInstanceGuestAgentsImpl implements VMInstanceGuestAgents { private readonly client: AzureArcVMwareManagementServiceAPI; /** - * Initialize a new instance of the class GuestAgents class. + * Initialize a new instance of the class VMInstanceGuestAgents class. * @param client Reference to the service client */ constructor(client: AzureArcVMwareManagementServiceAPI) { @@ -43,20 +48,15 @@ export class GuestAgentsImpl implements GuestAgents { /** * Returns the list of GuestAgent of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ - public listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams + public list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByVmPagingAll( - resourceGroupName, - virtualMachineName, - options - ); + const iter = this.listPagingAll(resourceUri, options); return { next() { return iter.next(); @@ -68,42 +68,27 @@ export class GuestAgentsImpl implements GuestAgents { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options, - settings - ); + return this.listPagingPage(resourceUri, options, settings); } }; } - private async *listByVmPagingPage( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams, + private async *listPagingPage( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: GuestAgentsListByVmResponse; + let result: VMInstanceGuestAgentsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByVm( - resourceGroupName, - virtualMachineName, - options - ); + result = await this._list(resourceUri, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByVmNext( - resourceGroupName, - virtualMachineName, - continuationToken, - options - ); + result = await this._listNext(resourceUri, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -111,45 +96,37 @@ export class GuestAgentsImpl implements GuestAgents { } } - private async *listByVmPagingAll( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams + private async *listPagingAll( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByVmPagingPage( - resourceGroupName, - virtualMachineName, - options - )) { + for await (const page of this.listPagingPage(resourceUri, options)) { yield* page; } } /** * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginCreate( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, - GuestAgentsCreateResponse + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -182,15 +159,18 @@ export class GuestAgentsImpl implements GuestAgents { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, name, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VMInstanceGuestAgentsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -198,65 +178,56 @@ export class GuestAgentsImpl implements GuestAgents { /** * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - virtualMachineName, - name, - options - ); + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate(resourceUri, options); return poller.pollUntilDone(); } /** * Implements GuestAgent GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ get( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsGetOptionalParams - ): Promise { + resourceUri: string, + options?: VMInstanceGuestAgentsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, name, options }, + { resourceUri, options }, getOperationSpec ); } /** * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise, void>> { + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsDeleteResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -289,13 +260,16 @@ export class GuestAgentsImpl implements GuestAgents { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, name, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VMInstanceGuestAgentsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -304,59 +278,49 @@ export class GuestAgentsImpl implements GuestAgents { /** * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineName, - name, - options - ); + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); return poller.pollUntilDone(); } /** * Returns the list of GuestAgent of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. * @param options The options parameters. */ - private _listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams - ): Promise { + private _list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - listByVmOperationSpec + { resourceUri, options }, + listOperationSpec ); } /** - * ListByVmNext - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param nextLink The nextLink from the previous successful call to the ListByVm method. + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ - private _listByVmNext( - resourceGroupName: string, - virtualMachineName: string, + private _listNext( + resourceUri: string, nextLink: string, - options?: GuestAgentsListByVmNextOptionalParams - ): Promise { + options?: VMInstanceGuestAgentsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, nextLink, options }, - listByVmNextOperationSpec + { resourceUri, nextLink, options }, + listNextOperationSpec ); } } @@ -365,7 +329,7 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default", httpMethod: "PUT", responses: { 200: { @@ -384,22 +348,16 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body13, + requestBody: Parameters.body12, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default", httpMethod: "GET", responses: { 200: { @@ -410,43 +368,39 @@ const getOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, + 201: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, + 202: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, + 204: { + headersMapper: Mappers.VMInstanceGuestAgentsDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; -const listByVmOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents", + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents", httpMethod: "GET", responses: { 200: { @@ -457,16 +411,11 @@ const listByVmOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; -const listByVmNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -480,9 +429,7 @@ const listByVmNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName + Parameters.resourceUri ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts new file mode 100644 index 000000000000..f3b1481ba3eb --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineInstances.ts @@ -0,0 +1,899 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VirtualMachineInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListNextOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesListResponse, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse, + VirtualMachineInstancesListNextResponse +} from "../models"; + +/// +/** Class containing VirtualMachineInstances operations. */ +export class VirtualMachineInstancesImpl implements VirtualMachineInstances { + private readonly client: AzureArcVMwareManagementServiceAPI; + + /** + * Initialize a new instance of the class VirtualMachineInstances class. + * @param client Reference to the service client + */ + constructor(client: AzureArcVMwareManagementServiceAPI) { + this.client = client; + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualMachineInstancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Retrieves information about a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginUpdate( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise { + const poller = await this.beginStop(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise { + const poller = await this.beginStart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesRestartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VirtualMachineInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body9, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.force, + Parameters.deleteFromHost + ], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstancesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstancesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts index f4fa0b961f08..69a0878fc8be 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachineTemplates.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VirtualMachineTemplate, VirtualMachineTemplatesListNextOptionalParams, @@ -181,8 +185,8 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesCreateResponse > > { @@ -192,7 +196,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineTemplatesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body9, + requestBody: Parameters.body6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts deleted file mode 100644 index 0827cbca9c38..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualMachines.ts +++ /dev/null @@ -1,1264 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { VirtualMachines } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - VirtualMachine, - VirtualMachinesListNextOptionalParams, - VirtualMachinesListOptionalParams, - VirtualMachinesListResponse, - VirtualMachinesListByResourceGroupNextOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesListByResourceGroupResponse, - VirtualMachinesAssessPatchesOptionalParams, - VirtualMachinesAssessPatchesResponse, - VirtualMachineInstallPatchesParameters, - VirtualMachinesInstallPatchesOptionalParams, - VirtualMachinesInstallPatchesResponse, - VirtualMachinesCreateOptionalParams, - VirtualMachinesCreateResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachinesStopOptionalParams, - VirtualMachinesStartOptionalParams, - VirtualMachinesRestartOptionalParams, - VirtualMachinesListNextResponse, - VirtualMachinesListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing VirtualMachines operations. */ -export class VirtualMachinesImpl implements VirtualMachines { - private readonly client: AzureArcVMwareManagementServiceAPI; - - /** - * Initialize a new instance of the class VirtualMachines class. - * @param client Reference to the service client - */ - constructor(client: AzureArcVMwareManagementServiceAPI) { - this.client = client; - } - - /** - * List of virtualMachines in a subscription. - * @param options The options parameters. - */ - public list( - options?: VirtualMachinesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: VirtualMachinesListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: VirtualMachinesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: VirtualMachinesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List of virtualMachines in a resource group. - * @param resourceGroupName The Resource Group Name. - * @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: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: VirtualMachinesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - async beginAssessPatches( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesAssessPatchesResponse - > - > { - 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, name, options }, - assessPatchesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - async beginAssessPatchesAndWait( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise { - const poller = await this.beginAssessPatches( - resourceGroupName, - name, - options - ); - return poller.pollUntilDone(); - } - - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - async beginInstallPatches( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesInstallPatchesResponse - > - > { - 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, name, installPatchesInput, options }, - installPatchesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - async beginInstallPatchesAndWait( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise { - const poller = await this.beginInstallPatches( - resourceGroupName, - name, - installPatchesInput, - options - ); - return poller.pollUntilDone(); - } - - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesCreateResponse - > - > { - 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, virtualMachineName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Implements virtual machine GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - getOperationSpec - ); - } - - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesUpdateResponse - > - > { - 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, virtualMachineName, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): 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, virtualMachineName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - virtualMachineName: 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, virtualMachineName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise { - const poller = await this.beginStop( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - virtualMachineName: 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, virtualMachineName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise { - const poller = await this.beginStart( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - virtualMachineName: 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, virtualMachineName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise { - const poller = await this.beginRestart( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * List of virtualMachines in a subscription. - * @param options The options parameters. - */ - private _list( - options?: VirtualMachinesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * List of virtualMachines in a resource group. - * @param resourceGroupName The Resource Group Name. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: VirtualMachinesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The Resource Group Name. - * @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 - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const assessPatchesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - 201: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - 202: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - 204: { - bodyMapper: Mappers.VirtualMachineAssessPatchesResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept], - serializer -}; -const installPatchesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - 201: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - 202: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - 204: { - bodyMapper: Mappers.VirtualMachineInstallPatchesResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.installPatchesInput, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - 202: { - bodyMapper: Mappers.VirtualMachine - }, - 204: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - 202: { - bodyMapper: Mappers.VirtualMachine - }, - 204: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.force, Parameters.retain], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/stop", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const startOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/start", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/restart", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts index bfba70f8c546..81550f54e808 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/virtualNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VirtualNetwork, VirtualNetworksListNextOptionalParams, @@ -181,8 +185,8 @@ export class VirtualNetworksImpl implements VirtualNetworks { virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksCreateResponse > > { @@ -192,7 +196,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -225,15 +229,18 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -302,14 +309,14 @@ export class VirtualNetworksImpl implements VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -342,13 +349,13 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -455,7 +462,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body10, + requestBody: Parameters.body7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -501,7 +508,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body4, + requestBody: Parameters.body1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..0df1394cf9e2 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operations/vmInstanceHybridIdentityMetadataOperations.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { VmInstanceHybridIdentityMetadataOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcVMwareManagementServiceAPI } from "../azureArcVMwareManagementServiceAPI"; +import { + VmInstanceHybridIdentityMetadata, + VmInstanceHybridIdentityMetadataListNextOptionalParams, + VmInstanceHybridIdentityMetadataListOptionalParams, + VmInstanceHybridIdentityMetadataListResponse, + VmInstanceHybridIdentityMetadataGetOptionalParams, + VmInstanceHybridIdentityMetadataGetResponse, + VmInstanceHybridIdentityMetadataListNextResponse +} from "../models"; + +/// +/** Class containing VmInstanceHybridIdentityMetadataOperations operations. */ +export class VmInstanceHybridIdentityMetadataOperationsImpl + implements VmInstanceHybridIdentityMetadataOperations { + private readonly client: AzureArcVMwareManagementServiceAPI; + + /** + * Initialize a new instance of the class VmInstanceHybridIdentityMetadataOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureArcVMwareManagementServiceAPI) { + this.client = client; + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VmInstanceHybridIdentityMetadataListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VmInstanceHybridIdentityMetadataListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadata + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts index faf01b7f2f6d..8aea19fc6e33 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/clusters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Cluster, ClustersListOptionalParams, @@ -51,8 +51,8 @@ export interface Clusters { clusterName: string, options?: ClustersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateResponse > >; @@ -99,7 +99,7 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements cluster DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts index a1a38711b1e2..5457e08a69af 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/datastores.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Datastore, DatastoresListOptionalParams, @@ -51,8 +51,8 @@ export interface Datastores { datastoreName: string, options?: DatastoresCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatastoresCreateResponse > >; @@ -99,7 +99,7 @@ export interface Datastores { resourceGroupName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements datastore DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts deleted file mode 100644 index d6119b3a49c4..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/guestAgents.ts +++ /dev/null @@ -1,105 +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 { - GuestAgent, - GuestAgentsListByVmOptionalParams, - GuestAgentsCreateOptionalParams, - GuestAgentsCreateResponse, - GuestAgentsGetOptionalParams, - GuestAgentsGetResponse, - GuestAgentsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a GuestAgents. */ -export interface GuestAgents { - /** - * Returns the list of GuestAgent of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: GuestAgentsListByVmOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - GuestAgentsCreateResponse - > - >; - /** - * Create Or Update GuestAgent. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the guestAgents. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsCreateOptionalParams - ): Promise; - /** - * Implements GuestAgent GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsGetOptionalParams - ): Promise; - /** - * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise, void>>; - /** - * Implements GuestAgent DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param name Name of the GuestAgent. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - name: string, - options?: GuestAgentsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts index 101dc6a8237b..69068b6bad55 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hosts.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Host, HostsListOptionalParams, @@ -49,7 +49,7 @@ export interface Hosts { hostName: string, options?: HostsCreateOptionalParams ): Promise< - PollerLike, HostsCreateResponse> + SimplePollerLike, HostsCreateResponse> >; /** * Create Or Update host. @@ -94,7 +94,7 @@ export interface Hosts { resourceGroupName: string, hostName: string, options?: HostsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements host DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts deleted file mode 100644 index 899c06efe1bf..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/hybridIdentityMetadataOperations.ts +++ /dev/null @@ -1,73 +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 { - HybridIdentityMetadata, - HybridIdentityMetadataListByVmOptionalParams, - HybridIdentityMetadataCreateOptionalParams, - HybridIdentityMetadataCreateResponse, - HybridIdentityMetadataGetOptionalParams, - HybridIdentityMetadataGetResponse, - HybridIdentityMetadataDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a HybridIdentityMetadataOperations. */ -export interface HybridIdentityMetadataOperations { - /** - * Returns the list of HybridIdentityMetadata of the given vm. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param options The options parameters. - */ - listByVm( - resourceGroupName: string, - virtualMachineName: string, - options?: HybridIdentityMetadataListByVmOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create Or Update HybridIdentityMetadata. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the hybridIdentityMetadata. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataCreateOptionalParams - ): Promise; - /** - * Implements HybridIdentityMetadata GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataGetOptionalParams - ): Promise; - /** - * Implements HybridIdentityMetadata DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the vm. - * @param metadataName Name of the HybridIdentityMetadata. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - virtualMachineName: string, - metadataName: string, - options?: HybridIdentityMetadataDeleteOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts index 5adaf861d073..6d0f6f8da9e9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/index.ts @@ -7,7 +7,6 @@ */ export * from "./operations"; -export * from "./virtualMachines"; export * from "./resourcePools"; export * from "./clusters"; export * from "./hosts"; @@ -16,6 +15,6 @@ export * from "./vCenters"; export * from "./virtualMachineTemplates"; export * from "./virtualNetworks"; export * from "./inventoryItems"; -export * from "./hybridIdentityMetadataOperations"; -export * from "./machineExtensions"; -export * from "./guestAgents"; +export * from "./virtualMachineInstances"; +export * from "./vmInstanceHybridIdentityMetadataOperations"; +export * from "./vMInstanceGuestAgents"; diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts deleted file mode 100644 index c7d8fa7b6b61..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/machineExtensions.ts +++ /dev/null @@ -1,147 +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 { - MachineExtension, - MachineExtensionsListOptionalParams, - MachineExtensionsCreateOrUpdateOptionalParams, - MachineExtensionsCreateOrUpdateResponse, - MachineExtensionUpdate, - MachineExtensionsUpdateOptionalParams, - MachineExtensionsUpdateResponse, - MachineExtensionsDeleteOptionalParams, - MachineExtensionsGetOptionalParams, - MachineExtensionsGetResponse -} from "../models"; - -/// -/** Interface representing a MachineExtensions. */ -export interface MachineExtensions { - /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - name: string, - options?: MachineExtensionsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsCreateOrUpdateResponse - > - >; - /** - * The operation to create or update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtension, - options?: MachineExtensionsCreateOrUpdateOptionalParams - ): Promise; - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MachineExtensionsUpdateResponse - > - >; - /** - * The operation to update the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - extensionParameters: MachineExtensionUpdate, - options?: MachineExtensionsUpdateOptionalParams - ): Promise; - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>>; - /** - * The operation to delete the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsDeleteOptionalParams - ): Promise; - /** - * The operation to get the extension. - * @param resourceGroupName The Resource Group Name. - * @param name The name of the machine containing the extension. - * @param extensionName The name of the machine extension. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - name: string, - extensionName: string, - options?: MachineExtensionsGetOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts index f38af51a4768..e0cac4cdae09 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/resourcePools.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ResourcePool, ResourcePoolsListOptionalParams, @@ -51,8 +51,8 @@ export interface ResourcePools { resourcePoolName: string, options?: ResourcePoolsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ResourcePoolsCreateResponse > >; @@ -99,7 +99,7 @@ export interface ResourcePools { resourceGroupName: string, resourcePoolName: string, options?: ResourcePoolsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements resourcePool DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts index 9e64ad5f4f79..9c814367deb9 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vCenters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VCenter, VCentersListOptionalParams, @@ -51,8 +51,8 @@ export interface VCenters { vcenterName: string, options?: VCentersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VCentersCreateResponse > >; @@ -99,7 +99,7 @@ export interface VCenters { resourceGroupName: string, vcenterName: string, options?: VCentersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements vCenter DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts new file mode 100644 index 000000000000..2e3359c69b21 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vMInstanceGuestAgents.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GuestAgent, + VMInstanceGuestAgentsListOptionalParams, + VMInstanceGuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateResponse, + VMInstanceGuestAgentsGetOptionalParams, + VMInstanceGuestAgentsGetResponse, + VMInstanceGuestAgentsDeleteOptionalParams, + VMInstanceGuestAgentsDeleteResponse +} from "../models"; + +/// +/** Interface representing a VMInstanceGuestAgents. */ +export interface VMInstanceGuestAgents { + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreate( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsCreateResponse + > + >; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise; + /** + * Implements GuestAgent GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VMInstanceGuestAgentsGetOptionalParams + ): Promise; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsDeleteResponse + > + >; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts new file mode 100644 index 000000000000..8a67d2bac737 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineInstances.ts @@ -0,0 +1,205 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineInstances. */ +export interface VirtualMachineInstances { + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginUpdate( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + >; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + >; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise; + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + >; + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + >; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + >; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise; +} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts index 3ede0b5755fd..c1d47c1f59a3 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachineTemplates.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualMachineTemplate, VirtualMachineTemplatesListOptionalParams, @@ -51,8 +51,8 @@ export interface VirtualMachineTemplates { virtualMachineTemplateName: string, options?: VirtualMachineTemplatesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesCreateResponse > >; @@ -99,7 +99,7 @@ export interface VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements virtual machine template DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts deleted file mode 100644 index 198d86b32801..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualMachines.ts +++ /dev/null @@ -1,262 +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 { - VirtualMachine, - VirtualMachinesListOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesAssessPatchesOptionalParams, - VirtualMachinesAssessPatchesResponse, - VirtualMachineInstallPatchesParameters, - VirtualMachinesInstallPatchesOptionalParams, - VirtualMachinesInstallPatchesResponse, - VirtualMachinesCreateOptionalParams, - VirtualMachinesCreateResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachinesStopOptionalParams, - VirtualMachinesStartOptionalParams, - VirtualMachinesRestartOptionalParams -} from "../models"; - -/// -/** Interface representing a VirtualMachines. */ -export interface VirtualMachines { - /** - * List of virtualMachines in a subscription. - * @param options The options parameters. - */ - list( - options?: VirtualMachinesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * List of virtualMachines in a resource group. - * @param resourceGroupName The Resource Group Name. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - beginAssessPatches( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesAssessPatchesResponse - > - >; - /** - * The operation to assess patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param options The options parameters. - */ - beginAssessPatchesAndWait( - resourceGroupName: string, - name: string, - options?: VirtualMachinesAssessPatchesOptionalParams - ): Promise; - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - beginInstallPatches( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesInstallPatchesResponse - > - >; - /** - * The operation to install patches on a vSphere VMware machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the vSphere VMware machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param options The options parameters. - */ - beginInstallPatchesAndWait( - resourceGroupName: string, - name: string, - installPatchesInput: VirtualMachineInstallPatchesParameters, - options?: VirtualMachinesInstallPatchesOptionalParams - ): Promise; - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesCreateResponse - > - >; - /** - * Create Or Update virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateOptionalParams - ): Promise; - /** - * Implements virtual machine GET method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams - ): Promise; - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesUpdateResponse - > - >; - /** - * API to update certain properties of the virtual machine resource. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams - ): Promise; - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise, void>>; - /** - * Implements virtual machine DELETE method. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise; - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise, void>>; - /** - * Stop virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise; - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise, void>>; - /** - * Start virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise; - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise, void>>; - /** - * Restart virtual machine. - * @param resourceGroupName The Resource Group Name. - * @param virtualMachineName Name of the virtual machine resource. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise; -} diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts index a777b889ed4f..44465ed20eae 100644 --- a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/virtualNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualNetwork, VirtualNetworksListOptionalParams, @@ -51,8 +51,8 @@ export interface VirtualNetworks { virtualNetworkName: string, options?: VirtualNetworksCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksCreateResponse > >; @@ -99,7 +99,7 @@ export interface VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Implements virtual network DELETE method. * @param resourceGroupName The Resource Group Name. diff --git a/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..994aa7724cb3 --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/src/operationsInterfaces/vmInstanceHybridIdentityMetadataOperations.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + VmInstanceHybridIdentityMetadata, + VmInstanceHybridIdentityMetadataListOptionalParams, + VmInstanceHybridIdentityMetadataGetOptionalParams, + VmInstanceHybridIdentityMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a VmInstanceHybridIdentityMetadataOperations. */ +export interface VmInstanceHybridIdentityMetadataOperations { + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VmInstanceHybridIdentityMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/connectedvmware/arm-connectedvmware/test/connectedvmware_operations_test.spec.ts b/sdk/connectedvmware/arm-connectedvmware/test/connectedvmware_operations_test.spec.ts new file mode 100644 index 000000000000..63f04ba94cdd --- /dev/null +++ b/sdk/connectedvmware/arm-connectedvmware/test/connectedvmware_operations_test.spec.ts @@ -0,0 +1,68 @@ +/* + * 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 { + env, + Recorder, + RecorderStartOptions, + delay, + isPlaybackMode, +} from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert } from "chai"; +import { Context } from "mocha"; +import { AzureArcVMwareManagementServiceAPI } from "../src/azureArcVMwareManagementServiceAPI"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +export const testPollingOptions = { + updateIntervalInMs: isPlaybackMode() ? 0 : undefined, +}; + +describe("connectedvmware test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: AzureArcVMwareManagementServiceAPI; + let location: string; + let resourceGroup: string; + let resourcename: string; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + subscriptionId = env.SUBSCRIPTION_ID || ''; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new AzureArcVMwareManagementServiceAPI(credential, subscriptionId, recorder.configureClientOptions({})); + location = "eastus"; + resourceGroup = "myjstest"; + resourcename = "resourcetest"; + + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("operation list test", async function () { + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + }); + +}) diff --git a/sdk/connectedvmware/arm-connectedvmware/test/sampleTest.ts b/sdk/connectedvmware/arm-connectedvmware/test/sampleTest.ts deleted file mode 100644 index 25aeb3ebcc36..000000000000 --- a/sdk/connectedvmware/arm-connectedvmware/test/sampleTest.ts +++ /dev/null @@ -1,43 +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 { - Recorder, - RecorderStartOptions, - env -} from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables -}; - -describe("My test", () => { - let recorder: Recorder; - - beforeEach(async function(this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - }); - - afterEach(async function() { - await recorder.stop(); - }); - - it("sample test", async function() { - console.log("Hi, I'm a test!"); - }); -});