diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md index c04a14081ca2..a3f41dd98040 100644 --- a/sdk/compute/arm-compute/CHANGELOG.md +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -1,15 +1,14 @@ # Release History + +## 21.2.0 (2023-08-08) + +**Features** -## 21.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Interface CreationData has a new optional parameter elasticSanResourceId + - Interface Disk has a new optional parameter lastOwnershipUpdateTime + - Enum KnownDiskCreateOption has a new value CopyFromSanSnapshot + + ## 21.1.0 (2023-07-07) **Features** diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json index 86612fe07657..ccbb9b71e5cf 100644 --- a/sdk/compute/arm-compute/_meta.json +++ b/sdk/compute/arm-compute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "310a0100f5b020c1900c527a6aa70d21992f078a", + "commit": "b9403296f0b0e112b0d8222ad05fd1d79ee10e03", "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.5 --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.7.0", - "use": "@autorest/typescript@6.0.5" + "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 7bebc4e46ed2..fd50e930aab3 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.1.1", + "version": "21.2.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.4", "@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 f9b50249b9ef..7466d872fc6c 100644 --- a/sdk/compute/arm-compute/review/arm-compute.api.md +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -1186,6 +1186,7 @@ export type CopyCompletionErrorReason = string; // @public export interface CreationData { createOption: DiskCreateOption; + elasticSanResourceId?: string; galleryImageReference?: ImageDiskReference; imageReference?: ImageDiskReference; logicalSectorSize?: number; @@ -1517,6 +1518,7 @@ export interface Disk extends Resource { encryptionSettingsCollection?: EncryptionSettingsCollection; extendedLocation?: ExtendedLocation; hyperVGeneration?: HyperVGeneration; + readonly lastOwnershipUpdateTime?: Date; readonly managedBy?: string; readonly managedByExtended?: string[]; maxShares?: number; @@ -3149,6 +3151,7 @@ export enum KnownDiskControllerTypes { export enum KnownDiskCreateOption { Attach = "Attach", Copy = "Copy", + CopyFromSanSnapshot = "CopyFromSanSnapshot", CopyStart = "CopyStart", Empty = "Empty", FromImage = "FromImage", diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index ac98c4bc74a1..e1fc45dbf8c3 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.1.1`; + const packageDetails = `azsdk-js-arm-compute/21.2.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 42acaa4a2538..dd018e169443 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -2860,6 +2860,8 @@ export interface CreationData { securityDataUri?: string; /** Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled. */ performancePlus?: boolean; + /** Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. */ + elasticSanResourceId?: string; } /** The source image used for creating the disk. */ @@ -5562,6 +5564,11 @@ export interface Disk extends Resource { dataAccessAuthMode?: DataAccessAuthMode; /** Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. */ optimizedForFrequentAttach?: boolean; + /** + * The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastOwnershipUpdateTime?: Date; } /** disk access resource. */ @@ -8379,7 +8386,9 @@ export enum KnownDiskCreateOption { /** Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId */ ImportSecure = "ImportSecure", /** Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state */ - UploadPreparedSecure = "UploadPreparedSecure" + UploadPreparedSecure = "UploadPreparedSecure", + /** Create a new disk by exporting from elastic san volume snapshot */ + CopyFromSanSnapshot = "CopyFromSanSnapshot" } /** @@ -8396,7 +8405,8 @@ export enum KnownDiskCreateOption { * **Upload**: Create a new disk by obtaining a write token and using it to directly upload the contents of the disk. \ * **CopyStart**: Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source. \ * **ImportSecure**: Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId \ - * **UploadPreparedSecure**: Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state + * **UploadPreparedSecure**: Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state \ + * **CopyFromSanSnapshot**: Create a new disk by exporting from elastic san volume snapshot */ export type DiskCreateOption = string; diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index d95ac0bdbe91..bc772c4547bf 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -7578,6 +7578,12 @@ export const CreationData: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + elasticSanResourceId: { + serializedName: "elasticSanResourceId", + type: { + name: "String" + } } } } @@ -14259,6 +14265,13 @@ export const Disk: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + lastOwnershipUpdateTime: { + serializedName: "properties.LastOwnershipUpdateTime", + readOnly: true, + type: { + name: "DateTime" + } } } } diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index b991bdde783f..917adcaef6fb 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -966,7 +966,7 @@ export const diskName: OperationURLParameter = { export const apiVersion1: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-01-02", + defaultValue: "2023-04-02", isConstant: true, serializedName: "api-version", type: { 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"