From 861511f7fcdbb7878f989f97965ec7d23c5b92e2 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 26 Sep 2024 03:49:21 +0000 Subject: [PATCH] CodeGen from PR 30401 in Azure/azure-rest-api-specs Merge 34f160bdcf442d3c59f3593a7de658d02a178350 into b478dcdabacb37945ff89daa0eda1ae1afc98db4 --- common/config/rush/pnpm-lock.yaml | 37 ++++++++++++-- sdk/scvmm/arm-scvmm/CHANGELOG.md | 24 +++++++--- sdk/scvmm/arm-scvmm/_meta.json | 8 ++-- sdk/scvmm/arm-scvmm/package.json | 20 +++----- sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md | 13 ++++- sdk/scvmm/arm-scvmm/src/models/index.ts | 24 ++++++++++ sdk/scvmm/arm-scvmm/src/models/mappers.ts | 48 +++++++++++++++++++ sdk/scvmm/arm-scvmm/src/models/parameters.ts | 4 +- .../arm-scvmm/src/operations/guestAgents.ts | 36 +++++++------- .../src/operations/virtualMachineInstances.ts | 9 +--- .../vmInstanceHybridIdentityMetadatas.ts | 39 +++++++-------- .../virtualMachineInstances.ts | 5 -- sdk/scvmm/arm-scvmm/src/scVmm.ts | 4 +- sdk/scvmm/arm-scvmm/test/sampleTest.ts | 43 +++++++++++++++++ sdk/scvmm/arm-scvmm/tsconfig.json | 10 +--- 15 files changed, 233 insertions(+), 91 deletions(-) create mode 100644 sdk/scvmm/arm-scvmm/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 085053ae5602..caaf57dc270e 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10902,6 +10902,37 @@ packages: yn: 3.1.1 dev: false + /ts-node@10.9.2(@types/node@18.19.50)(typescript@5.5.4): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.19.50 + acorn: 8.12.1 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.5.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.2(@types/node@18.19.50)(typescript@5.6.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -18606,7 +18637,7 @@ packages: dev: false file:projects/arm-scvmm.tgz: - resolution: {integrity: sha512-9CALsrjrdueT716KYVr+WsmvSDJi2pAMFscBUUf5SxksN+u3+GFpjxn1t6gIfifdAcqdpwwIi+C6dAJOYHQhww==, tarball: file:projects/arm-scvmm.tgz} + resolution: {integrity: sha512-UgdHxYjR19+VWwpgeWRLXWAp2fPTzbZa64KZNUfo9UpNOPSRyn9cjK67wwxe5dEiIDltWRFjwh7qMQ+eTRantA==, tarball: file:projects/arm-scvmm.tgz} name: '@rush-temp/arm-scvmm' version: 0.0.0 dependencies: @@ -18625,10 +18656,10 @@ packages: mkdirp: 3.0.1 mocha: 10.7.3 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.6.2) + ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.5.4) tslib: 2.7.0 tsx: 4.19.1 - typescript: 5.6.2 + typescript: 5.5.4 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' diff --git a/sdk/scvmm/arm-scvmm/CHANGELOG.md b/sdk/scvmm/arm-scvmm/CHANGELOG.md index 5b01b392c183..b26d02fcc925 100644 --- a/sdk/scvmm/arm-scvmm/CHANGELOG.md +++ b/sdk/scvmm/arm-scvmm/CHANGELOG.md @@ -1,15 +1,25 @@ # Release History - -## 1.0.1 (Unreleased) - + +## 2.0.0 (2024-09-26) + ### Features Added -### Breaking Changes + - Interface GuestAgentProperties has a new optional parameter privateLinkScopeResourceId + - Interface OsProfileForVmInstance has a new optional parameter domainName + - Interface OsProfileForVmInstance has a new optional parameter domainPassword + - Interface OsProfileForVmInstance has a new optional parameter domainUsername + - Interface OsProfileForVmInstance has a new optional parameter productKey + - Interface OsProfileForVmInstance has a new optional parameter runOnceCommands + - Interface OsProfileForVmInstance has a new optional parameter timezone + - Interface OsProfileForVmInstance has a new optional parameter workgroup + - Interface VirtualMachineInstancesStopOptionalParams has a new optional parameter body -### Bugs Fixed - -### Other Changes +### Breaking Changes + - Operation VirtualMachineInstances.beginStop has a new signature + - Operation VirtualMachineInstances.beginStopAndWait has a new signature + + ## 1.0.0 (2024-06-25) ### Features Added diff --git a/sdk/scvmm/arm-scvmm/_meta.json b/sdk/scvmm/arm-scvmm/_meta.json index 79a83344421d..61a19396c208 100644 --- a/sdk/scvmm/arm-scvmm/_meta.json +++ b/sdk/scvmm/arm-scvmm/_meta.json @@ -1,8 +1,8 @@ { - "commit": "768c1f32bbfdcea80bdadf92dc2fba2c114c2dda", + "commit": "9b1303a1571cde5342cbccf3d91851f5ad4aea2f", "readme": "specification/scvmm/resource-manager/readme.md", - "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\\scvmm\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/scvmm/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", - "use": "@autorest/typescript@6.0.23" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.14", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/package.json b/sdk/scvmm/arm-scvmm/package.json index e1bc3928264f..f5f537dceda7 100644 --- a/sdk/scvmm/arm-scvmm/package.json +++ b/sdk/scvmm/arm-scvmm/package.json @@ -3,13 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ScVmm.", - "version": "1.0.1", + "version": "2.0.0", "engines": { "node": ">=18.0.0" }, "dependencies": { "@azure/core-lro": "^2.5.4", - "@azure/abort-controller": "^1.0.0", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.6.0", @@ -30,12 +30,12 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.6.2", + "typescript": "~5.5.3", "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", + "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", "mocha": "^10.0.0", @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm" +} \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md b/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md index e8c1fb3c5f77..717658eea93d 100644 --- a/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md +++ b/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md @@ -346,6 +346,7 @@ export interface GuestAgentProperties { credentials?: GuestCredential; readonly customResourceName?: string; httpProxyConfig?: HttpProxyConfiguration; + privateLinkScopeResourceId?: string; provisioningAction?: ProvisioningAction; readonly provisioningState?: ProvisioningState; readonly status?: string; @@ -727,9 +728,16 @@ export type Origin = string; export interface OsProfileForVmInstance { adminPassword?: string; computerName?: string; + domainName?: string; + domainPassword?: string; + domainUsername?: string; readonly osSku?: string; readonly osType?: OsType; readonly osVersion?: string; + productKey?: string; + runOnceCommands?: string; + timezone?: number; + workgroup?: string; } // @public @@ -925,8 +933,8 @@ export interface VirtualMachineInstances { beginRestoreCheckpointAndWait(resourceUri: string, body: VirtualMachineRestoreCheckpoint, options?: VirtualMachineInstancesRestoreCheckpointOptionalParams): Promise; beginStart(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise, VirtualMachineInstancesStartResponse>>; beginStartAndWait(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise; - beginStop(resourceUri: string, body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; - beginStopAndWait(resourceUri: string, body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams): Promise; + beginStop(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; + beginStopAndWait(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise; beginUpdate(resourceUri: string, properties: VirtualMachineInstanceUpdate, options?: VirtualMachineInstancesUpdateOptionalParams): Promise, VirtualMachineInstancesUpdateResponse>>; beginUpdateAndWait(resourceUri: string, properties: VirtualMachineInstanceUpdate, options?: VirtualMachineInstancesUpdateOptionalParams): Promise; get(resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams): Promise; @@ -1068,6 +1076,7 @@ export interface VirtualMachineInstancesStopHeaders { // @public export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + body?: StopVirtualMachineOptions; resumeFrom?: string; updateIntervalInMs?: number; } diff --git a/sdk/scvmm/arm-scvmm/src/models/index.ts b/sdk/scvmm/arm-scvmm/src/models/index.ts index 1333a36fa204..398cf2c7b52c 100644 --- a/sdk/scvmm/arm-scvmm/src/models/index.ts +++ b/sdk/scvmm/arm-scvmm/src/models/index.ts @@ -84,6 +84,26 @@ export interface OsProfileForVmInstance { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osVersion?: string; + /** Gets or sets the domain name. */ + domainName?: string; + /** Gets or sets the domain username. */ + domainUsername?: string; + /** + * Password of the domain the VM has to join. + * This value contains a credential. Consider obscuring before showing to users + */ + domainPassword?: string; + /** Gets or sets the workgroup. */ + workgroup?: string; + /** + * Gets or sets the product key.Input format xxxxx-xxxxx-xxxxx-xxxxx-xxxxx + * This value contains a credential. Consider obscuring before showing to users + */ + productKey?: string; + /** Gets or sets the index value of the timezone. */ + timezone?: number; + /** Get or sets the commands to be run once at the time of creation separated by semicolons. */ + runOnceCommands?: string; } /** Defines the resource properties. */ @@ -495,6 +515,8 @@ export interface GuestAgentProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; } /** Username / Password Credentials to connect to guest. */ @@ -1774,6 +1796,8 @@ export type VirtualMachineInstancesStartResponse = /** Optional parameters. */ export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { + /** The content of the action request */ + 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. */ diff --git a/sdk/scvmm/arm-scvmm/src/models/mappers.ts b/sdk/scvmm/arm-scvmm/src/models/mappers.ts index 41a3ca0ab468..ca7ed2db4225 100644 --- a/sdk/scvmm/arm-scvmm/src/models/mappers.ts +++ b/sdk/scvmm/arm-scvmm/src/models/mappers.ts @@ -166,6 +166,48 @@ export const OsProfileForVmInstance: coreClient.CompositeMapper = { name: "String", }, }, + domainName: { + serializedName: "domainName", + type: { + name: "String", + }, + }, + domainUsername: { + serializedName: "domainUsername", + type: { + name: "String", + }, + }, + domainPassword: { + serializedName: "domainPassword", + type: { + name: "String", + }, + }, + workgroup: { + serializedName: "workgroup", + type: { + name: "String", + }, + }, + productKey: { + serializedName: "productKey", + type: { + name: "String", + }, + }, + timezone: { + serializedName: "timezone", + type: { + name: "Number", + }, + }, + runOnceCommands: { + serializedName: "runOnceCommands", + type: { + name: "String", + }, + }, }, }, }; @@ -1185,6 +1227,12 @@ export const GuestAgentProperties: coreClient.CompositeMapper = { name: "String", }, }, + privateLinkScopeResourceId: { + serializedName: "privateLinkScopeResourceId", + type: { + name: "String", + }, + }, }, }, }; diff --git a/sdk/scvmm/arm-scvmm/src/models/parameters.ts b/sdk/scvmm/arm-scvmm/src/models/parameters.ts index 02ea9d02e1e5..9f4dd52612b5 100644 --- a/sdk/scvmm/arm-scvmm/src/models/parameters.ts +++ b/sdk/scvmm/arm-scvmm/src/models/parameters.ts @@ -59,7 +59,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-10-07", + defaultValue: "2024-06-01", isConstant: true, serializedName: "api-version", type: { @@ -138,7 +138,7 @@ export const body2: OperationParameter = { }; export const body3: OperationParameter = { - parameterPath: "body", + parameterPath: ["options", "body"], mapper: StopVirtualMachineOptionsMapper, }; diff --git a/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts b/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts index 4a5bd28686ce..32e4ef91d703 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/guestAgents.ts @@ -344,22 +344,22 @@ const deleteOperationSpec: coreClient.OperationSpec = { serializer, }; const listByVirtualMachineInstanceNextOperationSpec: coreClient.OperationSpec = -{ - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GuestAgentListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, + { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgentListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; + urlParameters: [ + Parameters.$host, + Parameters.resourceUri, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts index 71bfe1cf74be..aa0abda61d03 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts @@ -46,7 +46,6 @@ import { VirtualMachineInstancesRestoreCheckpointResponse, VirtualMachineInstancesStartOptionalParams, VirtualMachineInstancesStartResponse, - StopVirtualMachineOptions, VirtualMachineInstancesStopOptionalParams, VirtualMachineInstancesStopResponse, VirtualMachineInstancesListNextResponse, @@ -842,12 +841,10 @@ export class VirtualMachineInstancesImpl implements VirtualMachineInstances { /** * The operation to power off (stop) a virtual machine instance. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request * @param options The options parameters. */ async beginStop( resourceUri: string, - body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams, ): Promise< SimplePollerLike< @@ -895,7 +892,7 @@ export class VirtualMachineInstancesImpl implements VirtualMachineInstances { const lro = createLroSpec({ sendOperationFn, - args: { resourceUri, body, options }, + args: { resourceUri, options }, spec: stopOperationSpec, }); const poller = await createHttpPoller< @@ -913,15 +910,13 @@ export class VirtualMachineInstancesImpl implements VirtualMachineInstances { /** * The operation to power off (stop) a virtual machine instance. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request * @param options The options parameters. */ async beginStopAndWait( resourceUri: string, - body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams, ): Promise { - const poller = await this.beginStop(resourceUri, body, options); + const poller = await this.beginStop(resourceUri, options); return poller.pollUntilDone(); } diff --git a/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts b/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts index 0cfbe9e78850..fc560d7ba61b 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/vmInstanceHybridIdentityMetadatas.ts @@ -26,7 +26,8 @@ import { /// /** Class containing VmInstanceHybridIdentityMetadatas operations. */ export class VmInstanceHybridIdentityMetadatasImpl - implements VmInstanceHybridIdentityMetadatas { + implements VmInstanceHybridIdentityMetadatas +{ private readonly client: ScVmm; /** @@ -193,22 +194,22 @@ const getOperationSpec: coreClient.OperationSpec = { serializer, }; const listByVirtualMachineInstanceNextOperationSpec: coreClient.OperationSpec = -{ - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VmInstanceHybridIdentityMetadataListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, + { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; + urlParameters: [ + Parameters.$host, + Parameters.resourceUri, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts index 9a63b27d1911..a84570e24782 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts @@ -33,7 +33,6 @@ import { VirtualMachineInstancesRestoreCheckpointResponse, VirtualMachineInstancesStartOptionalParams, VirtualMachineInstancesStartResponse, - StopVirtualMachineOptions, VirtualMachineInstancesStopOptionalParams, VirtualMachineInstancesStopResponse, } from "../models"; @@ -268,12 +267,10 @@ export interface VirtualMachineInstances { /** * The operation to power off (stop) a virtual machine instance. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request * @param options The options parameters. */ beginStop( resourceUri: string, - body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams, ): Promise< SimplePollerLike< @@ -284,12 +281,10 @@ export interface VirtualMachineInstances { /** * The operation to power off (stop) a virtual machine instance. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request * @param options The options parameters. */ beginStopAndWait( resourceUri: string, - body: StopVirtualMachineOptions, options?: VirtualMachineInstancesStopOptionalParams, ): Promise; } diff --git a/sdk/scvmm/arm-scvmm/src/scVmm.ts b/sdk/scvmm/arm-scvmm/src/scVmm.ts index fc2f02302875..61c14f406f91 100644 --- a/sdk/scvmm/arm-scvmm/src/scVmm.ts +++ b/sdk/scvmm/arm-scvmm/src/scVmm.ts @@ -86,7 +86,7 @@ export class ScVmm extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-scvmm/1.0.1`; + const packageDetails = `azsdk-js-arm-scvmm/2.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -140,7 +140,7 @@ export class ScVmm extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-10-07"; + this.apiVersion = options.apiVersion || "2024-06-01"; this.virtualMachineInstances = new VirtualMachineInstancesImpl(this); this.guestAgents = new GuestAgentsImpl(this); this.vmInstanceHybridIdentityMetadatas = diff --git a/sdk/scvmm/arm-scvmm/test/sampleTest.ts b/sdk/scvmm/arm-scvmm/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + 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!"); + }); +}); diff --git a/sdk/scvmm/arm-scvmm/tsconfig.json b/sdk/scvmm/arm-scvmm/tsconfig.json index dcb6754c3ab3..3e6ae96443f3 100644 --- a/sdk/scvmm/arm-scvmm/tsconfig.json +++ b/sdk/scvmm/arm-scvmm/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-scvmm": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"