diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6d33bf3b27f3..8ca87d7c4e67 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3825,7 +3825,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230523 + typescript: 5.2.0-dev.20230524 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8368,14 +8368,20 @@ packages: hasBin: true dev: false + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} hasBin: true dev: false - /typescript/5.2.0-dev.20230523: - resolution: {integrity: sha512-LrDMumdesS4xcmqzEwLqbg33EtWQeSSXqrydFklXphBiv5+aETXiyUnUStkje8syf4+6j0MQTW0KzijiLS+rew==} + /typescript/5.2.0-dev.20230524: + resolution: {integrity: sha512-1XzSUJCt31jm7jIZ3vBKzK46ZxnmqX2VdVg/dur9AIaz9WmidrABs7F8H8d4onpIV8RYD/L6xW6MXR5EHjl+LA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -13094,7 +13100,7 @@ packages: dev: false file:projects/arm-network-1.tgz: - resolution: {integrity: sha512-gGxn8y+MWnI9ZcjkEEyWvTRuta7sRLQ5ioIzsvxS3ojT8VqnGr2OGHhFiORHSivRZt8kjHNM/Cqab8RuLdVJDw==, tarball: file:projects/arm-network-1.tgz} + resolution: {integrity: sha512-HP4VbHNAjhBlsVcszfjybzzFd7MlgIBwbEnYhkPOk+uNySUPuU1whPAIPsgcbAkwf90ulTjitwCRSmBdf91Zhg==, tarball: file:projects/arm-network-1.tgz} name: '@rush-temp/arm-network-1' version: 0.0.0 dependencies: @@ -13115,7 +13121,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_ehqevut6loiv2j3zjuhqc62mru tslib: 2.5.2 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index 5b85e1bd3339..64e7116d1c6b 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,15 +1,19 @@ # Release History + +## 32.0.0 (2023-05-25) + +**Features** -## 31.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Type Alias AdminState + - Interface DdosProtectionPlan has a new optional parameter publicIpAddresses + - Interface VirtualNetworkGateway has a new optional parameter adminState + - Added Enum KnownAdminState -### Other Changes +**Breaking Changes** + - Interface DdosProtectionPlan no longer has parameter publicIPAddresses + + ## 31.0.0 (2023-05-19) **Features** diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json index 260ce06e74a8..0d3f28bbfbc3 100644 --- a/sdk/network/arm-network/_meta.json +++ b/sdk/network/arm-network/_meta.json @@ -1,8 +1,8 @@ { - "commit": "ec1dd632841c121d2e2eac3d9e5e24a0428fa741", + "commit": "71a586feb524b691231daa75fbc462ecca3b158e", "readme": "specification/network/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\\network\\resource-manager\\readme.md --use=@autorest/typescript@6.0.2 --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/network/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.2" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 0f26c75e7780..072c43677114 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -3,12 +3,12 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkManagementClient.", - "version": "31.0.1", + "version": "32.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", @@ -36,7 +36,7 @@ "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "dotenv": "^16.0.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network" +} \ No newline at end of file diff --git a/sdk/network/arm-network/review/arm-network.api.md b/sdk/network/arm-network/review/arm-network.api.md index 1b96bd189147..dfba37bb2163 100644 --- a/sdk/network/arm-network/review/arm-network.api.md +++ b/sdk/network/arm-network/review/arm-network.api.md @@ -253,6 +253,9 @@ export interface AdminRulesListOptionalParams extends coreClient.OperationOption // @public export type AdminRulesListResponse = AdminRuleListResult; +// @public +export type AdminState = string; + // @public export interface ApplicationGateway extends Resource { authenticationCertificates?: ApplicationGatewayAuthenticationCertificate[]; @@ -2951,7 +2954,7 @@ export interface DdosProtectionPlan { location?: string; readonly name?: string; readonly provisioningState?: ProvisioningState; - readonly publicIPAddresses?: SubResource[]; + readonly publicIpAddresses?: SubResource[]; readonly resourceGuid?: string; tags?: { [propertyName: string]: string; @@ -5949,6 +5952,12 @@ export enum KnownAdminRuleKind { Default = "Default" } +// @public +export enum KnownAdminState { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownApplicationGatewayBackendHealthServerHealth { Down = "Down", @@ -13583,6 +13592,7 @@ export type VirtualNetworkEncryptionEnforcement = string; // @public export interface VirtualNetworkGateway extends Resource { active?: boolean; + adminState?: AdminState; allowRemoteVnetTraffic?: boolean; allowVirtualWanTraffic?: boolean; bgpSettings?: BgpSettings; diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index 514ba5e57c58..b856f74d8e18 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -1221,15 +1221,15 @@ export interface DdosProtectionPlan { */ readonly provisioningState?: ProvisioningState; /** - * The list of public IPs associated with the DDoS protection plan resource. This list is read-only. + * The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly publicIPAddresses?: SubResource[]; + readonly virtualNetworks?: SubResource[]; /** - * The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + * The list of public IPs associated with the DDoS protection plan resource. This list is read-only. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly virtualNetworks?: SubResource[]; + readonly publicIpAddresses?: SubResource[]; } /** A list of DDoS protection plans. */ @@ -2614,9 +2614,9 @@ export interface VirtualApplianceNicProperties { /** Network Virtual Appliance Additional NIC properties. */ export interface VirtualApplianceAdditionalNicProperties { - /** Customer Name for additional nic */ + /** Name of additional nic */ name?: string; - /** Customer Intent for Public Ip on additional nic */ + /** Flag (true alse) for Intent for Public Ip on additional nic */ hasPublicIp?: boolean; } @@ -10424,6 +10424,8 @@ export interface VirtualNetworkGateway extends Resource { allowVirtualWanTraffic?: boolean; /** Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. */ allowRemoteVnetTraffic?: boolean; + /** Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet */ + adminState?: AdminState; } /** A common class for general resource information. */ @@ -15183,6 +15185,24 @@ export enum KnownVpnNatRuleMode { */ export type VpnNatRuleMode = string; +/** Known values of {@link AdminState} that the service accepts. */ +export enum KnownAdminState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for AdminState. \ + * {@link KnownAdminState} can be used interchangeably with AdminState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type AdminState = string; + /** Known values of {@link VirtualNetworkGatewayConnectionType} that the service accepts. */ export enum KnownVirtualNetworkGatewayConnectionType { /** IPsec */ diff --git a/sdk/network/arm-network/src/models/mappers.ts b/sdk/network/arm-network/src/models/mappers.ts index 13321224e0ab..e03a322dd47e 100644 --- a/sdk/network/arm-network/src/models/mappers.ts +++ b/sdk/network/arm-network/src/models/mappers.ts @@ -3317,8 +3317,8 @@ export const DdosProtectionPlan: coreClient.CompositeMapper = { name: "String" } }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", + virtualNetworks: { + serializedName: "properties.virtualNetworks", readOnly: true, type: { name: "Sequence", @@ -3330,8 +3330,8 @@ export const DdosProtectionPlan: coreClient.CompositeMapper = { } } }, - virtualNetworks: { - serializedName: "properties.virtualNetworks", + publicIpAddresses: { + serializedName: "properties.publicIpAddresses", readOnly: true, type: { name: "Sequence", @@ -27829,6 +27829,12 @@ export const VirtualNetworkGateway: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + adminState: { + serializedName: "properties.adminState", + type: { + name: "String" + } } } } diff --git a/sdk/network/arm-network/src/models/parameters.ts b/sdk/network/arm-network/src/models/parameters.ts index 1684aa0207e6..661a2dabda53 100644 --- a/sdk/network/arm-network/src/models/parameters.ts +++ b/sdk/network/arm-network/src/models/parameters.ts @@ -203,7 +203,7 @@ export const applicationGatewayName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01", + defaultValue: "2023-02-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index c4f772e14d5f..e9298ad00563 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -365,7 +365,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-network/31.0.1`; + const packageDetails = `azsdk-js-arm-network/32.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/network/arm-network/test/sampleTest.ts b/sdk/network/arm-network/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/network/arm-network/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/network/arm-network/tsconfig.json b/sdk/network/arm-network/tsconfig.json index 094dfbf3dbe3..3e6ae96443f3 100644 --- a/sdk/network/arm-network/tsconfig.json +++ b/sdk/network/arm-network/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-network": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"