Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions sdk/compute/arm-compute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Release History

## 21.2.0 (2023-08-04)

**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**
Expand Down
8 changes: 4 additions & 4 deletions sdk/compute/arm-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "310a0100f5b020c1900c527a6aa70d21992f078a",
"commit": "11d5e9832efa131af144abbd02c5c592478b1a9d",
"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"
}
19 changes: 5 additions & 14 deletions sdk/compute/arm-compute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
3 changes: 3 additions & 0 deletions sdk/compute/arm-compute/review/arm-compute.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,7 @@ export type CopyCompletionErrorReason = string;
// @public
export interface CreationData {
createOption: DiskCreateOption;
elasticSanResourceId?: string;
galleryImageReference?: ImageDiskReference;
imageReference?: ImageDiskReference;
logicalSectorSize?: number;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -3149,6 +3151,7 @@ export enum KnownDiskControllerTypes {
export enum KnownDiskCreateOption {
Attach = "Attach",
Copy = "Copy",
CopyFromSanSnapshot = "CopyFromSanSnapshot",
CopyStart = "CopyStart",
Empty = "Empty",
FromImage = "FromImage",
Expand Down
2 changes: 1 addition & 1 deletion sdk/compute/arm-compute/src/computeManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
14 changes: 12 additions & 2 deletions sdk/compute/arm-compute/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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"
}

/**
Expand All @@ -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;

Expand Down
13 changes: 13 additions & 0 deletions sdk/compute/arm-compute/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7578,6 +7578,12 @@ export const CreationData: coreClient.CompositeMapper = {
type: {
name: "Boolean"
}
},
elasticSanResourceId: {
serializedName: "elasticSanResourceId",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -14259,6 +14265,13 @@ export const Disk: coreClient.CompositeMapper = {
type: {
name: "Boolean"
}
},
lastOwnershipUpdateTime: {
serializedName: "properties.LastOwnershipUpdateTime",
readOnly: true,
type: {
name: "DateTime"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/compute/arm-compute/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
43 changes: 43 additions & 0 deletions sdk/compute/arm-compute/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -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<string, string> = {
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!");
});
});
10 changes: 2 additions & 8 deletions sdk/compute/arm-compute/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down