diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index f5e41f7e249f..d743e3779458 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,19 @@ # Release History + +## 22.0.0 (2023-06-21) + +**Features** -## 21.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Interface DiskPurchasePlan -### Other Changes +**Breaking Changes** + - Type of parameter purchasePlan of interface Disk is changed from PurchasePlanAutoGenerated to DiskPurchasePlan + - Type of parameter purchasePlan of interface DiskRestorePoint is changed from PurchasePlanAutoGenerated to DiskPurchasePlan + - Type of parameter purchasePlan of interface DiskUpdate is changed from PurchasePlanAutoGenerated to DiskPurchasePlan + - Type of parameter purchasePlan of interface Snapshot is changed from PurchasePlanAutoGenerated to DiskPurchasePlan + + ## 21.0.0 (2023-05-17) **Features** diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index 826fb6a5033f..44beadd920ca 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "a2140e7ff0a6c28df501b16c51fe85b762a386fc", + "commit": "462cd9381f116840ea36c6911bdf96bf38d3e5f3", "readme": "specification/compute/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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\compute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/compute/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index ade08ec6addf..1c1f064b1955 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -3,12 +3,12 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ComputeManagementClient.", - "version": "21.0.1", + "version": "22.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", @@ -48,8 +48,7 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-network": "^26.0.0" + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -112,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute" +} \ No newline at end of file diff --git a/sdk/compute/arm-compute/review/arm-compute.api.md b/sdk/compute/arm-compute/review/arm-compute.api.md index 2bc70772e10b..ca4cfb42e5ed 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -1526,7 +1526,7 @@ export interface Disk extends Resource { readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; readonly provisioningState?: string; publicNetworkAccess?: PublicNetworkAccess; - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; securityProfile?: DiskSecurityProfile; readonly shareInfo?: ShareInfoElement[]; sku?: DiskSku; @@ -1849,6 +1849,14 @@ export interface DiskList { value: Disk[]; } +// @public +export interface DiskPurchasePlan { + name: string; + product: string; + promotionCode?: string; + publisher: string; +} + // @public export interface DiskRestorePoint extends ProxyOnlyResource { completionPercent?: number; @@ -1859,7 +1867,7 @@ export interface DiskRestorePoint extends ProxyOnlyResource { networkAccessPolicy?: NetworkAccessPolicy; readonly osType?: OperatingSystemTypes; publicNetworkAccess?: PublicNetworkAccess; - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; readonly replicationState?: string; securityProfile?: DiskSecurityProfile; readonly sourceResourceId?: string; @@ -2070,7 +2078,7 @@ export interface DiskUpdate { osType?: OperatingSystemTypes; readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; publicNetworkAccess?: PublicNetworkAccess; - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; sku?: DiskSku; supportedCapabilities?: SupportedCapabilities; supportsHibernation?: boolean; @@ -4461,14 +4469,6 @@ export interface PurchasePlan { publisher: string; } -// @public -export interface PurchasePlanAutoGenerated { - name: string; - product: string; - promotionCode?: string; - publisher: string; -} - // @public export interface RecommendedMachineConfiguration { memory?: ResourceRange; @@ -5287,7 +5287,7 @@ export interface Snapshot extends Resource { osType?: OperatingSystemTypes; readonly provisioningState?: string; publicNetworkAccess?: PublicNetworkAccess; - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; securityProfile?: DiskSecurityProfile; sku?: SnapshotSku; supportedCapabilities?: SupportedCapabilities; diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index b91bdcdc06ec..505a0bd95d13 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -145,7 +145,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-compute/21.0.1`; + const packageDetails = `azsdk-js-arm-compute/22.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index abc7c3a7788b..ecbbc58e7d41 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -2812,7 +2812,7 @@ export interface DiskSku { } /** Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. */ -export interface PurchasePlanAutoGenerated { +export interface DiskPurchasePlan { /** The plan ID. */ name: string; /** The publisher ID. */ @@ -2977,7 +2977,7 @@ export interface DiskUpdate { /** Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. */ burstingEnabled?: boolean; /** Purchase plan information to be added on the OS disk */ - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; /** List of supported capabilities to be added on the OS disk. */ supportedCapabilities?: SupportedCapabilities; /** @@ -5484,7 +5484,7 @@ export interface Disk extends Resource { /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ hyperVGeneration?: HyperVGeneration; /** Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} */ - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; /** List of supported capabilities for the image from which the OS disk was created. */ supportedCapabilities?: SupportedCapabilities; /** Disk source information. CreationData information cannot be changed after the disk has been created. */ @@ -5638,7 +5638,7 @@ export interface Snapshot extends Resource { /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ hyperVGeneration?: HyperVGeneration; /** Purchase plan information for the image from which the source disk for the snapshot was originally created. */ - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; /** List of supported capabilities for the image from which the source disk from the snapshot was originally created. */ supportedCapabilities?: SupportedCapabilities; /** Disk source information. CreationData information cannot be changed after the disk has been created. */ @@ -6264,7 +6264,7 @@ export interface DiskRestorePoint extends ProxyOnlyResource { /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ hyperVGeneration?: HyperVGeneration; /** Purchase plan information for the the image from which the OS disk was created. */ - purchasePlan?: PurchasePlanAutoGenerated; + purchasePlan?: DiskPurchasePlan; /** List of supported capabilities for the image from which the OS disk was created. */ supportedCapabilities?: SupportedCapabilities; /** diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index c5452e132b4b..70b5dc59ef8e 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -7441,10 +7441,10 @@ export const DiskSku: coreClient.CompositeMapper = { } }; -export const PurchasePlanAutoGenerated: coreClient.CompositeMapper = { +export const DiskPurchasePlan: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PurchasePlanAutoGenerated", + className: "DiskPurchasePlan", modelProperties: { name: { serializedName: "name", @@ -7911,7 +7911,7 @@ export const DiskUpdate: coreClient.CompositeMapper = { serializedName: "properties.purchasePlan", type: { name: "Composite", - className: "PurchasePlanAutoGenerated" + className: "DiskPurchasePlan" } }, supportedCapabilities: { @@ -14071,7 +14071,7 @@ export const Disk: coreClient.CompositeMapper = { serializedName: "properties.purchasePlan", type: { name: "Composite", - className: "PurchasePlanAutoGenerated" + className: "DiskPurchasePlan" } }, supportedCapabilities: { @@ -14429,7 +14429,7 @@ export const Snapshot: coreClient.CompositeMapper = { serializedName: "properties.purchasePlan", type: { name: "Composite", - className: "PurchasePlanAutoGenerated" + className: "DiskPurchasePlan" } }, supportedCapabilities: { @@ -16053,7 +16053,7 @@ export const DiskRestorePoint: coreClient.CompositeMapper = { serializedName: "properties.purchasePlan", type: { name: "Composite", - className: "PurchasePlanAutoGenerated" + className: "DiskPurchasePlan" } }, supportedCapabilities: { diff --git a/sdk/compute/arm-compute/test/sampleTest.ts b/sdk/compute/arm-compute/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/compute/arm-compute/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/compute/arm-compute/tsconfig.json b/sdk/compute/arm-compute/tsconfig.json index b84abc8423ab..3e6ae96443f3 100644 --- a/sdk/compute/arm-compute/tsconfig.json +++ b/sdk/compute/arm-compute/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-compute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"