Skip to content

Commit be771f5

Browse files
author
SDKAuto
committed
CodeGen from PR 25118 in Azure/azure-rest-api-specs
Merge 693e25cd5c5a507d1f9c584971fc114f6d138c25 into d9d0d67f9d080e6501c78d5b6cc2bc768a2ff6b9
1 parent 48e32d4 commit be771f5

File tree

10 files changed

+93
-40
lines changed

10 files changed

+93
-40
lines changed

sdk/compute/arm-compute/CHANGELOG.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Release History
2+
3+
## 21.2.0 (2023-08-04)
4+
5+
**Features**
26

3-
## 21.1.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
7+
- Interface CreationData has a new optional parameter elasticSanResourceId
8+
- Interface Disk has a new optional parameter lastOwnershipUpdateTime
9+
- Enum KnownDiskCreateOption has a new value CopyFromSanSnapshot
10+
11+
1312
## 21.1.0 (2023-07-07)
1413

1514
**Features**

sdk/compute/arm-compute/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "310a0100f5b020c1900c527a6aa70d21992f078a",
2+
"commit": "11d5e9832efa131af144abbd02c5c592478b1a9d",
33
"readme": "specification/compute/resource-manager/readme.md",
4-
"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",
4+
"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",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
7-
"use": "@autorest/typescript@6.0.5"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
7+
"use": "@autorest/typescript@^6.0.4"
88
}

sdk/compute/arm-compute/package.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for ComputeManagementClient.",
6-
"version": "21.1.1",
6+
"version": "21.2.0",
77
"engines": {
88
"node": ">=14.0.0"
99
},
1010
"dependencies": {
11-
"@azure/core-lro": "^2.5.3",
11+
"@azure/core-lro": "^2.5.4",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
1414
"@azure/core-client": "^1.7.0",
@@ -48,8 +48,7 @@
4848
"chai": "^4.2.0",
4949
"cross-env": "^7.0.2",
5050
"@types/node": "^14.0.0",
51-
"@azure/dev-tool": "^1.0.0",
52-
"@azure/arm-network": "^26.0.0"
51+
"@azure/dev-tool": "^1.0.0"
5352
},
5453
"repository": {
5554
"type": "git",
@@ -112,13 +111,5 @@
112111
]
113112
},
114113
"autoPublish": true,
115-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute",
116-
"//sampleConfiguration": {
117-
"productName": "",
118-
"productSlugs": [
119-
"azure"
120-
],
121-
"disableDocsMs": true,
122-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview"
123-
}
124-
}
114+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute"
115+
}

sdk/compute/arm-compute/review/arm-compute.api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,7 @@ export type CopyCompletionErrorReason = string;
11861186
// @public
11871187
export interface CreationData {
11881188
createOption: DiskCreateOption;
1189+
elasticSanResourceId?: string;
11891190
galleryImageReference?: ImageDiskReference;
11901191
imageReference?: ImageDiskReference;
11911192
logicalSectorSize?: number;
@@ -1517,6 +1518,7 @@ export interface Disk extends Resource {
15171518
encryptionSettingsCollection?: EncryptionSettingsCollection;
15181519
extendedLocation?: ExtendedLocation;
15191520
hyperVGeneration?: HyperVGeneration;
1521+
readonly lastOwnershipUpdateTime?: Date;
15201522
readonly managedBy?: string;
15211523
readonly managedByExtended?: string[];
15221524
maxShares?: number;
@@ -3149,6 +3151,7 @@ export enum KnownDiskControllerTypes {
31493151
export enum KnownDiskCreateOption {
31503152
Attach = "Attach",
31513153
Copy = "Copy",
3154+
CopyFromSanSnapshot = "CopyFromSanSnapshot",
31523155
CopyStart = "CopyStart",
31533156
Empty = "Empty",
31543157
FromImage = "FromImage",

sdk/compute/arm-compute/src/computeManagementClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient {
145145
credential: credentials
146146
};
147147

148-
const packageDetails = `azsdk-js-arm-compute/21.1.1`;
148+
const packageDetails = `azsdk-js-arm-compute/21.2.0`;
149149
const userAgentPrefix =
150150
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
151151
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`

sdk/compute/arm-compute/src/models/index.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2860,6 +2860,8 @@ export interface CreationData {
28602860
securityDataUri?: string;
28612861
/** 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. */
28622862
performancePlus?: boolean;
2863+
/** Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. */
2864+
elasticSanResourceId?: string;
28632865
}
28642866

28652867
/** The source image used for creating the disk. */
@@ -5562,6 +5564,11 @@ export interface Disk extends Resource {
55625564
dataAccessAuthMode?: DataAccessAuthMode;
55635565
/** 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. */
55645566
optimizedForFrequentAttach?: boolean;
5567+
/**
5568+
* 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.
5569+
* NOTE: This property will not be serialized. It can only be populated by the server.
5570+
*/
5571+
readonly lastOwnershipUpdateTime?: Date;
55655572
}
55665573

55675574
/** disk access resource. */
@@ -8379,7 +8386,9 @@ export enum KnownDiskCreateOption {
83798386
/** 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 */
83808387
ImportSecure = "ImportSecure",
83818388
/** 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 */
8382-
UploadPreparedSecure = "UploadPreparedSecure"
8389+
UploadPreparedSecure = "UploadPreparedSecure",
8390+
/** Create a new disk by exporting from elastic san volume snapshot */
8391+
CopyFromSanSnapshot = "CopyFromSanSnapshot"
83838392
}
83848393

83858394
/**
@@ -8396,7 +8405,8 @@ export enum KnownDiskCreateOption {
83968405
* **Upload**: Create a new disk by obtaining a write token and using it to directly upload the contents of the disk. \
83978406
* **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. \
83988407
* **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 \
8399-
* **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
8408+
* **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 \
8409+
* **CopyFromSanSnapshot**: Create a new disk by exporting from elastic san volume snapshot
84008410
*/
84018411
export type DiskCreateOption = string;
84028412

sdk/compute/arm-compute/src/models/mappers.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7578,6 +7578,12 @@ export const CreationData: coreClient.CompositeMapper = {
75787578
type: {
75797579
name: "Boolean"
75807580
}
7581+
},
7582+
elasticSanResourceId: {
7583+
serializedName: "elasticSanResourceId",
7584+
type: {
7585+
name: "String"
7586+
}
75817587
}
75827588
}
75837589
}
@@ -14259,6 +14265,13 @@ export const Disk: coreClient.CompositeMapper = {
1425914265
type: {
1426014266
name: "Boolean"
1426114267
}
14268+
},
14269+
lastOwnershipUpdateTime: {
14270+
serializedName: "properties.LastOwnershipUpdateTime",
14271+
readOnly: true,
14272+
type: {
14273+
name: "DateTime"
14274+
}
1426214275
}
1426314276
}
1426414277
}

sdk/compute/arm-compute/src/models/parameters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ export const diskName: OperationURLParameter = {
966966
export const apiVersion1: OperationQueryParameter = {
967967
parameterPath: "apiVersion",
968968
mapper: {
969-
defaultValue: "2023-01-02",
969+
defaultValue: "2023-04-02",
970970
isConstant: true,
971971
serializedName: "api-version",
972972
type: {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
import {
10+
Recorder,
11+
RecorderStartOptions,
12+
env
13+
} from "@azure-tools/test-recorder";
14+
import { assert } from "chai";
15+
import { Context } from "mocha";
16+
17+
const replaceableVariables: Record<string, string> = {
18+
AZURE_CLIENT_ID: "azure_client_id",
19+
AZURE_CLIENT_SECRET: "azure_client_secret",
20+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
21+
SUBSCRIPTION_ID: "azure_subscription_id"
22+
};
23+
24+
const recorderOptions: RecorderStartOptions = {
25+
envSetupForPlayback: replaceableVariables
26+
};
27+
28+
describe("My test", () => {
29+
let recorder: Recorder;
30+
31+
beforeEach(async function(this: Context) {
32+
recorder = new Recorder(this.currentTest);
33+
await recorder.start(recorderOptions);
34+
});
35+
36+
afterEach(async function() {
37+
await recorder.stop();
38+
});
39+
40+
it("sample test", async function() {
41+
console.log("Hi, I'm a test!");
42+
});
43+
});

sdk/compute/arm-compute/tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@
1515
],
1616
"declaration": true,
1717
"outDir": "./dist-esm",
18-
"importHelpers": true,
19-
"paths": {
20-
"@azure/arm-compute": [
21-
"./src/index"
22-
]
23-
}
18+
"importHelpers": true
2419
},
2520
"include": [
2621
"./src/**/*.ts",
27-
"./test/**/*.ts",
28-
"samples-dev/**/*.ts"
22+
"./test/**/*.ts"
2923
],
3024
"exclude": [
3125
"node_modules"

0 commit comments

Comments
 (0)