diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c3051cfd6694..396ccf4586fb 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10902,6 +10902,37 @@ packages: yn: 3.1.1 dev: false + /ts-node@10.9.2(@types/node@18.19.50)(typescript@5.5.4): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.19.50 + acorn: 8.12.1 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.5.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.2(@types/node@18.19.50)(typescript@5.6.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -15340,7 +15371,7 @@ packages: dev: false file:projects/arm-elasticsan.tgz: - resolution: {integrity: sha512-BlEMVnmD+3jzmWPpvV0xMkGlqs4tz4NmdRAjl+EtycSetf19XpKwDEQbJHo5Z4yy4EE4ERDZzk6ksJXkvaisXg==, tarball: file:projects/arm-elasticsan.tgz} + resolution: {integrity: sha512-5yFXbD35o2EIaQrQr4tNhlS2tBWqpaQJ5yzy+Z2c1u/1cKR9vH7GbU6LGurMEZLS24a1nzmx4F3MODNF+vO2NQ==, tarball: file:projects/arm-elasticsan.tgz} name: '@rush-temp/arm-elasticsan' version: 0.0.0 dependencies: @@ -15359,10 +15390,10 @@ packages: mkdirp: 3.0.1 mocha: 10.7.3 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.6.2) + ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.5.4) tslib: 2.7.0 tsx: 4.19.1 - typescript: 5.6.2 + typescript: 5.5.4 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' diff --git a/sdk/elasticsans/arm-elasticsan/CHANGELOG.md b/sdk/elasticsans/arm-elasticsan/CHANGELOG.md index 3827d890d2f1..661192ac993b 100644 --- a/sdk/elasticsans/arm-elasticsan/CHANGELOG.md +++ b/sdk/elasticsans/arm-elasticsan/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 1.2.0-beta.1 (2024-09-26) +Compared with version 1.1.0 + +### Features Added + + - Added Interface AutoScaleProperties + - Added Interface ScaleUpProperties + - Added Type Alias AutoScalePolicyEnforcement + - Interface ElasticSanProperties has a new optional parameter autoScaleProperties + - Interface ElasticSanUpdateProperties has a new optional parameter autoScaleProperties + - Added Enum KnownAutoScalePolicyEnforcement + + ## 1.1.0 (2024-08-12) ### Features Added diff --git a/sdk/elasticsans/arm-elasticsan/README.md b/sdk/elasticsans/arm-elasticsan/README.md index eb3f113592dc..3528d9b75ee3 100644 --- a/sdk/elasticsans/arm-elasticsan/README.md +++ b/sdk/elasticsans/arm-elasticsan/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-elasticsan) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/elasticsans/arm-elasticsan/_meta.json b/sdk/elasticsans/arm-elasticsan/_meta.json index 15e22be4d88f..bcc30402d50f 100644 --- a/sdk/elasticsans/arm-elasticsan/_meta.json +++ b/sdk/elasticsans/arm-elasticsan/_meta.json @@ -1,8 +1,8 @@ { - "commit": "572fbc80c94ad3ae14d15e20c44a4f3407a2fed2", + "commit": "985bb9bddbf6297b8d81d5e4a284d395ec8b2b08", "readme": "specification/elasticsan/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\\elasticsan\\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/elasticsan/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.14", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/elasticsans/arm-elasticsan/package.json b/sdk/elasticsans/arm-elasticsan/package.json index c80b11f2f9c2..decb079d3ab4 100644 --- a/sdk/elasticsans/arm-elasticsan/package.json +++ b/sdk/elasticsans/arm-elasticsan/package.json @@ -3,13 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ElasticSanManagement.", - "version": "1.1.0", + "version": "1.2.0-beta.1", "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", @@ -30,12 +30,12 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.6.2", + "typescript": "~5.5.3", "uglify-js": "^3.4.9", "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", @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan" +} \ No newline at end of file diff --git a/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md b/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md index e2a7f93858f5..a18b931b0cd0 100644 --- a/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md +++ b/sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md @@ -16,6 +16,14 @@ export type Action = string; // @public export type ActionType = string; +// @public +export type AutoScalePolicyEnforcement = string; + +// @public +export interface AutoScaleProperties { + scaleUpProperties?: ScaleUpProperties; +} + // @public export type CreatedByType = string; @@ -66,6 +74,7 @@ export interface ElasticSanManagementOptionalParams extends coreClient.ServiceCl // @public export interface ElasticSanProperties { + autoScaleProperties?: AutoScaleProperties; availabilityZones?: string[]; baseSizeTiB: number; extendedCapacitySizeTiB: number; @@ -174,6 +183,7 @@ export interface ElasticSanUpdate { // @public export interface ElasticSanUpdateProperties { + autoScaleProperties?: AutoScaleProperties; baseSizeTiB?: number; extendedCapacitySizeTiB?: number; publicNetworkAccess?: PublicNetworkAccess; @@ -258,6 +268,13 @@ export enum KnownActionType { Internal = "Internal" } +// @public +export enum KnownAutoScalePolicyEnforcement { + Disabled = "Disabled", + Enabled = "Enabled", + None = "None" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -540,6 +557,14 @@ export interface Resource { readonly type?: string; } +// @public +export interface ScaleUpProperties { + autoScalePolicyEnforcement?: AutoScalePolicyEnforcement; + capacityUnitScaleUpLimitTiB?: number; + increaseCapacityUnitByTiB?: number; + unusedSizeTiB?: number; +} + // @public export interface Sku { name: SkuName; diff --git a/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts b/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts index e5c044b84d5d..6d0edbbca4d9 100644 --- a/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts +++ b/sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts @@ -68,7 +68,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-elasticsan/1.1.0`; + const packageDetails = `azsdk-js-arm-elasticsan/1.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -122,7 +122,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-05-01"; + this.apiVersion = options.apiVersion || "2024-06-01-preview"; this.operations = new OperationsImpl(this); this.skus = new SkusImpl(this); this.elasticSans = new ElasticSansImpl(this); diff --git a/sdk/elasticsans/arm-elasticsan/src/models/index.ts b/sdk/elasticsans/arm-elasticsan/src/models/index.ts index e3efdf09a337..418a65af7be8 100644 --- a/sdk/elasticsans/arm-elasticsan/src/models/index.ts +++ b/sdk/elasticsans/arm-elasticsan/src/models/index.ts @@ -249,6 +249,8 @@ export interface ElasticSanProperties { readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. */ publicNetworkAccess?: PublicNetworkAccess; + /** Auto Scale Properties for Elastic San Appliance. */ + autoScaleProperties?: AutoScaleProperties; } /** The SKU name. Required for account creation; optional for update. */ @@ -333,6 +335,24 @@ export interface SystemData { lastModifiedAt?: Date; } +/** The auto scale settings on Elastic San Appliance. */ +export interface AutoScaleProperties { + /** Scale up settings on Elastic San Appliance. */ + scaleUpProperties?: ScaleUpProperties; +} + +/** Scale up properties on Elastic San Appliance. */ +export interface ScaleUpProperties { + /** Unused size on Elastic San appliance in TiB. */ + unusedSizeTiB?: number; + /** Unit to increase Capacity Unit on Elastic San appliance in TiB. */ + increaseCapacityUnitByTiB?: number; + /** Maximum scale up size on Elastic San appliance in TiB. */ + capacityUnitScaleUpLimitTiB?: number; + /** Enable or Disable scale up setting on Elastic San Appliance. */ + autoScalePolicyEnforcement?: AutoScalePolicyEnforcement; +} + /** Response for ElasticSan update request. */ export interface ElasticSanUpdate { /** Properties of ElasticSan. */ @@ -349,6 +369,8 @@ export interface ElasticSanUpdateProperties { extendedCapacitySizeTiB?: number; /** Allow or disallow public network access to ElasticSan Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. */ publicNetworkAccess?: PublicNetworkAccess; + /** Auto Scale Properties for Elastic San Appliance. */ + autoScaleProperties?: AutoScaleProperties; } /** List of Volume Groups */ @@ -919,6 +941,27 @@ export enum KnownPublicNetworkAccess { */ export type PublicNetworkAccess = string; +/** Known values of {@link AutoScalePolicyEnforcement} that the service accepts. */ +export enum KnownAutoScalePolicyEnforcement { + /** None */ + None = "None", + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines values for AutoScalePolicyEnforcement. \ + * {@link KnownAutoScalePolicyEnforcement} can be used interchangeably with AutoScalePolicyEnforcement, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Enabled** \ + * **Disabled** + */ +export type AutoScalePolicyEnforcement = string; + /** Known values of {@link IdentityType} that the service accepts. */ export enum KnownIdentityType { /** None */ diff --git a/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts b/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts index 4abd88cd8cdf..f1ed0cf25970 100644 --- a/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts +++ b/sdk/elasticsans/arm-elasticsan/src/models/mappers.ts @@ -487,6 +487,13 @@ export const ElasticSanProperties: coreClient.CompositeMapper = { name: "String", }, }, + autoScaleProperties: { + serializedName: "autoScaleProperties", + type: { + name: "Composite", + className: "AutoScaleProperties", + }, + }, }, }, }; @@ -679,6 +686,55 @@ export const SystemData: coreClient.CompositeMapper = { }, }; +export const AutoScaleProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AutoScaleProperties", + modelProperties: { + scaleUpProperties: { + serializedName: "scaleUpProperties", + type: { + name: "Composite", + className: "ScaleUpProperties", + }, + }, + }, + }, +}; + +export const ScaleUpProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleUpProperties", + modelProperties: { + unusedSizeTiB: { + serializedName: "unusedSizeTiB", + type: { + name: "Number", + }, + }, + increaseCapacityUnitByTiB: { + serializedName: "increaseCapacityUnitByTiB", + type: { + name: "Number", + }, + }, + capacityUnitScaleUpLimitTiB: { + serializedName: "capacityUnitScaleUpLimitTiB", + type: { + name: "Number", + }, + }, + autoScalePolicyEnforcement: { + serializedName: "autoScalePolicyEnforcement", + type: { + name: "String", + }, + }, + }, + }, +}; + export const ElasticSanUpdate: coreClient.CompositeMapper = { type: { name: "Composite", @@ -725,6 +781,13 @@ export const ElasticSanUpdateProperties: coreClient.CompositeMapper = { name: "String", }, }, + autoScaleProperties: { + serializedName: "autoScaleProperties", + type: { + name: "Composite", + className: "AutoScaleProperties", + }, + }, }, }, }; diff --git a/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts b/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts index 15693fdb9758..4db4ffa24173 100644 --- a/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts +++ b/sdk/elasticsans/arm-elasticsan/src/models/parameters.ts @@ -49,7 +49,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-05-01", + defaultValue: "2024-06-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/elasticsans/arm-elasticsan/test/sampleTest.ts b/sdk/elasticsans/arm-elasticsan/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/elasticsans/arm-elasticsan/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/elasticsans/arm-elasticsan/tsconfig.json b/sdk/elasticsans/arm-elasticsan/tsconfig.json index a25947875abf..3e6ae96443f3 100644 --- a/sdk/elasticsans/arm-elasticsan/tsconfig.json +++ b/sdk/elasticsans/arm-elasticsan/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-elasticsan": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"