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
17 changes: 7 additions & 10 deletions sdk/compute/arm-compute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Release History

## 22.1.1 (Unreleased)

## 22.2.0 (2024-09-11)
### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Interface GalleryImageVersionSafetyProfile has a new optional parameter blockDeletionBeforeEndOfLife


## 22.1.0 (2024-08-12)

### Features Added
Expand Down Expand Up @@ -579,7 +576,7 @@

## 17.3.1 (2022-04-06)

### Features Added
**features**

- Bug fix

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": "3cef1bf0125458cc60dfb9e644e6bc28b787beab",
"commit": "6a0a78aa0cbf29a505e7d3384942c87d9ef1af33",
"readme": "specification/compute/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\\compute\\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/compute/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.12",
"use": "@autorest/typescript@^6.0.12"
}
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,13 +3,13 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ComputeManagementClient.",
"version": "22.1.1",
"version": "22.2.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",
Expand All @@ -35,7 +35,7 @@
"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",
Expand All @@ -45,7 +45,6 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/arm-network": "^32.2.0",
"ts-node": "^10.0.0"
},
"repository": {
Expand Down Expand Up @@ -107,13 +106,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"
}
1 change: 1 addition & 0 deletions sdk/compute/arm-compute/review/arm-compute.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,7 @@ export interface GalleryImageVersions {

// @public
export interface GalleryImageVersionSafetyProfile extends GalleryArtifactSafetyProfileBase {
blockDeletionBeforeEndOfLife?: boolean;
readonly policyViolations?: PolicyViolation[];
readonly reportedForPolicyViolation?: boolean;
}
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/22.1.1`;
const packageDetails = `azsdk-js-arm-compute/22.2.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
12 changes: 7 additions & 5 deletions sdk/compute/arm-compute/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ export interface DataDisk {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly diskMBpsReadWrite?: number;
/** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */
/** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */
detachOption?: DiskDetachOptionTypes;
/** Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. */
deleteOption?: DiskDeleteOptionTypes;
Expand Down Expand Up @@ -6003,7 +6003,7 @@ export interface GalleryImage extends Resource {
readonly provisioningState?: GalleryProvisioningState;
/** A list of gallery image features. */
features?: GalleryImageFeature[];
/** The architecture of the image. Applicable to OS disks only. */
/** CPU architecture supported by an OS disk. */
architecture?: Architecture;
}

Expand Down Expand Up @@ -6672,7 +6672,7 @@ export interface GalleryImageUpdate extends UpdateResourceDefinition {
readonly provisioningState?: GalleryProvisioningState;
/** A list of gallery image features. */
features?: GalleryImageFeature[];
/** The architecture of the image. Applicable to OS disks only. */
/** CPU architecture supported by an OS disk. */
architecture?: Architecture;
}

Expand Down Expand Up @@ -6806,6 +6806,8 @@ export interface GalleryImageVersionSafetyProfile
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly policyViolations?: PolicyViolation[];
/** Indicates whether or not the deletion is blocked for this Gallery Image Version if its End Of Life has not expired. */
blockDeletionBeforeEndOfLife?: boolean;
}

/** The safety profile of the Gallery Application Version. */
Expand Down Expand Up @@ -6857,7 +6859,7 @@ export interface CommunityGalleryImage extends PirCommunityGalleryResource {
features?: GalleryImageFeature[];
/** Describes the gallery image definition purchase plan. This is used by marketplace images. */
purchasePlan?: ImagePurchasePlan;
/** The architecture of the image. Applicable to OS disks only. */
/** CPU architecture supported by an OS disk. */
architecture?: Architecture;
/** Privacy statement URI for the current community gallery image. */
privacyStatementUri?: string;
Expand Down Expand Up @@ -6942,7 +6944,7 @@ export interface SharedGalleryImage extends PirSharedGalleryResource {
features?: GalleryImageFeature[];
/** Describes the gallery image definition purchase plan. This is used by marketplace images. */
purchasePlan?: ImagePurchasePlan;
/** The architecture of the image. Applicable to OS disks only. */
/** CPU architecture supported by an OS disk. */
architecture?: Architecture;
/** Privacy statement uri for the current community gallery image. */
privacyStatementUri?: string;
Expand Down
6 changes: 6 additions & 0 deletions sdk/compute/arm-compute/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17601,6 +17601,12 @@ export const GalleryImageVersionSafetyProfile: coreClient.CompositeMapper = {
},
},
},
blockDeletionBeforeEndOfLife: {
serializedName: "blockDeletionBeforeEndOfLife",
type: {
name: "Boolean",
},
},
},
},
};
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 @@ -1169,7 +1169,7 @@ export const galleryName: OperationURLParameter = {
export const apiVersion3: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2023-07-03",
defaultValue: "2024-03-03",
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