From dccc69e50d79e5f9b69228760171b13906990400 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 24 May 2022 05:43:03 +0000 Subject: [PATCH] CodeGen from PR 19183 in Azure/azure-rest-api-specs Merge 056a45de193563a2a8c2123b517ba5d6c58b89ba into 82f9aca16dfd6e8cf130d57d6b1e16c624b1d002 --- sdk/network/arm-network/CHANGELOG.md | 34 ++++- sdk/network/arm-network/_meta.json | 6 +- sdk/network/arm-network/package.json | 22 +-- .../arm-network/review/arm-network.api.md | 67 ++++++++- sdk/network/arm-network/src/models/index.ts | 102 +++++++++++-- sdk/network/arm-network/src/models/mappers.ts | 138 ++++++++++++++++++ .../arm-network/src/models/parameters.ts | 35 ++++- .../src/networkManagementClient.ts | 52 ++++++- .../expressRouteProviderPortsLocation.ts | 61 ++++++++ .../arm-network/src/operations/index.ts | 1 + .../src/operations/networkInterfaces.ts | 16 +- .../src/operations/publicIPAddresses.ts | 10 +- .../expressRouteProviderPortsLocation.ts | 23 +++ .../src/operationsInterfaces/index.ts | 1 + sdk/network/arm-network/test/sampleTest.ts | 43 ++++++ sdk/network/arm-network/tsconfig.json | 10 +- 16 files changed, 554 insertions(+), 67 deletions(-) create mode 100644 sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts create mode 100644 sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts create mode 100644 sdk/network/arm-network/test/sampleTest.ts diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index e83e3361c8c4..5d285843ea63 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,15 +1,33 @@ # Release History + +## 29.0.0 (2022-05-24) + +**Features** -## 28.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group ExpressRouteProviderPortsLocation + - Added Interface ExpressRouteProviderPortListResult + - Added Interface ExpressRouteProviderPortOptionalParams + - Added Interface ExpressRouteProviderPortsLocationListOptionalParams + - Added Interface VirtualRouterAutoScaleConfiguration + - Added Type Alias ExpressRouteProviderPort + - Added Type Alias ExpressRouteProviderPortResponse + - Added Type Alias ExpressRouteProviderPortsLocationListResponse + - Interface ExplicitProxySettings has a new optional parameter enablePacFile + - Class NetworkManagementClient has a new parameter expressRouteProviderPortsLocation + - Type Alias ApplicationGatewayRoutingRule has a new parameter priority + - Type Alias VirtualHub has a new parameter virtualRouterAutoScaleConfiguration + - Enum KnownApplicationGatewaySslPolicyName has a new value AppGwSslPolicy20220101 + - Enum KnownApplicationGatewaySslPolicyName has a new value AppGwSslPolicy20220101S + - Enum KnownApplicationGatewaySslPolicyType has a new value CustomV2 + - Enum KnownApplicationGatewaySslProtocol has a new value TLSv13 + - Enum KnownWebApplicationFirewallOperator has a new value Any -### Other Changes +**Breaking Changes** + - Interface NetworkManagementClientOptionalParams no longer has parameter apiVersion + - Class NetworkManagementClient no longer has parameter apiVersion + + ## 28.0.0 (2022-05-18) **Features** diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json index 32255842f293..ec84aa3d7415 100644 --- a/sdk/network/arm-network/_meta.json +++ b/sdk/network/arm-network/_meta.json @@ -1,8 +1,8 @@ { - "commit": "ab66050afa716937d8bdefe3164380a4028700f8", + "commit": "e46e16c490bef338ec529b0585cccffd1c3ab08a", "readme": "specification/network/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\network\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 5f5ca362f54c..b36b81195eca 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkManagementClient.", - "version": "28.0.1", + "version": "29.0.0", "engines": { "node": ">=12.0.0" }, @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network", "repository": { @@ -93,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 be02212d83a4..7450c125123b 100644 --- a/sdk/network/arm-network/review/arm-network.api.md +++ b/sdk/network/arm-network/review/arm-network.api.md @@ -601,6 +601,7 @@ export type ApplicationGatewayRoutingRule = SubResource & { readonly etag?: string; readonly type?: string; ruleType?: ApplicationGatewayRequestRoutingRuleType; + priority?: number; backendAddressPool?: SubResource; backendSettings?: SubResource; listener?: SubResource; @@ -2881,6 +2882,7 @@ export interface ExclusionManagedRuleSet { // @public export interface ExplicitProxySettings { enableExplicitProxy?: boolean; + enablePacFile?: boolean; httpPort?: number; httpsPort?: number; pacFile?: string; @@ -3966,6 +3968,45 @@ export interface ExpressRoutePortsUpdateTagsOptionalParams extends coreClient.Op // @public export type ExpressRoutePortsUpdateTagsResponse = ExpressRoutePort; +// @public +export type ExpressRouteProviderPort = Resource & { + readonly etag?: string; + readonly portPairDescriptor?: string; + readonly primaryAzurePort?: string; + readonly secondaryAzurePort?: string; + peeringLocation?: string; + overprovisionFactor?: number; + portBandwidthInMbps?: number; + usedBandwidthInMbps?: number; + remainingBandwidthInMbps?: number; +}; + +// @public +export interface ExpressRouteProviderPortListResult { + readonly nextLink?: string; + value?: ExpressRouteProviderPort[]; +} + +// @public +export interface ExpressRouteProviderPortOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRouteProviderPortResponse = ExpressRouteProviderPort; + +// @public +export interface ExpressRouteProviderPortsLocation { + list(options?: ExpressRouteProviderPortsLocationListOptionalParams): Promise; +} + +// @public +export interface ExpressRouteProviderPortsLocationListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ExpressRouteProviderPortsLocationListResponse = ExpressRouteProviderPortListResult; + // @public export type ExpressRouteServiceProvider = Resource & { peeringLocations?: string[]; @@ -5403,7 +5444,11 @@ export enum KnownApplicationGatewaySslPolicyName { // (undocumented) AppGwSslPolicy20170401 = "AppGwSslPolicy20170401", // (undocumented) - AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S" + AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S", + // (undocumented) + AppGwSslPolicy20220101 = "AppGwSslPolicy20220101", + // (undocumented) + AppGwSslPolicy20220101S = "AppGwSslPolicy20220101S" } // @public @@ -5411,6 +5456,8 @@ export enum KnownApplicationGatewaySslPolicyType { // (undocumented) Custom = "Custom", // (undocumented) + CustomV2 = "CustomV2", + // (undocumented) Predefined = "Predefined" } @@ -5421,7 +5468,9 @@ export enum KnownApplicationGatewaySslProtocol { // (undocumented) TLSv11 = "TLSv1_1", // (undocumented) - TLSv12 = "TLSv1_2" + TLSv12 = "TLSv1_2", + // (undocumented) + TLSv13 = "TLSv1_3" } // @public @@ -7050,6 +7099,8 @@ export enum KnownWebApplicationFirewallMode { // @public export enum KnownWebApplicationFirewallOperator { + // (undocumented) + Any = "Any", // (undocumented) BeginsWith = "BeginsWith", // (undocumented) @@ -8361,8 +8412,6 @@ export class NetworkManagementClient extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: NetworkManagementClientOptionalParams); // (undocumented) - apiVersion: string; - // (undocumented) applicationGatewayPrivateEndpointConnections: ApplicationGatewayPrivateEndpointConnections; // (undocumented) applicationGatewayPrivateLinkResources: ApplicationGatewayPrivateLinkResources; @@ -8433,6 +8482,9 @@ export class NetworkManagementClient extends coreClient.ServiceClient { expressRoutePorts: ExpressRoutePorts; // (undocumented) expressRoutePortsLocations: ExpressRoutePortsLocations; + expressRouteProviderPort(providerport: string, options?: ExpressRouteProviderPortOptionalParams): Promise; + // (undocumented) + expressRouteProviderPortsLocation: ExpressRouteProviderPortsLocation; // (undocumented) expressRouteServiceProviders: ExpressRouteServiceProviders; // (undocumented) @@ -8607,7 +8659,6 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // @public export interface NetworkManagementClientOptionalParams extends coreClient.ServiceClientOptions { $host?: string; - apiVersion?: string; endpoint?: string; } @@ -11856,6 +11907,7 @@ export type VirtualHub = Resource & { allowBranchToBranchTraffic?: boolean; preferredRoutingGateway?: PreferredRoutingGateway; hubRoutingPreference?: HubRoutingPreference; + virtualRouterAutoScaleConfiguration?: VirtualRouterAutoScaleConfiguration; }; // @public @@ -13077,6 +13129,11 @@ export type VirtualRouter = Resource & { readonly provisioningState?: ProvisioningState; }; +// @public +export interface VirtualRouterAutoScaleConfiguration { + minCapacity?: number; +} + // @public export interface VirtualRouterListResult { nextLink?: string; diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index bda4e4888ccc..502607feef36 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -1576,6 +1576,8 @@ export interface ExplicitProxySettings { httpPort?: number; /** Port number for explicit proxy https protocol, cannot be greater than 64000. */ httpsPort?: number; + /** When set to true, pac file port and url needs to be provided. */ + enablePacFile?: boolean; /** Port number for firewall to serve PAC file. */ pacFilePort?: number; /** SAS URL for PAC file. */ @@ -4630,6 +4632,12 @@ export interface VirtualHubRouteV2 { nextHops?: string[]; } +/** The VirtualHub Router autoscale configuration. */ +export interface VirtualRouterAutoScaleConfiguration { + /** The minimum number of scale units for VirtualHub Router. */ + minCapacity?: number; +} + /** Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. */ export interface ListVirtualHubsResult { /** List of VirtualHubs. */ @@ -5058,6 +5066,17 @@ export interface ManagedRuleOverride { state?: ManagedRuleEnabledState; } +/** Response for ListExpressRouteProviderPort API service call. */ +export interface ExpressRouteProviderPortListResult { + /** A list of ExpressRouteProviderPort resources. */ + value?: ExpressRouteProviderPort[]; + /** + * The URL to get the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Properties of the FirewallPolicyNatRuleCollectionAction. */ export interface FirewallPolicyNatRuleCollectionAction { /** The type of action. */ @@ -6306,6 +6325,8 @@ export type ApplicationGatewayRoutingRule = SubResource & { readonly type?: string; /** Rule type. */ ruleType?: ApplicationGatewayRequestRoutingRuleType; + /** Priority of the routing rule. */ + priority?: number; /** Backend address pool resource of the application gateway. */ backendAddressPool?: SubResource; /** Backend settings resource of the application gateway. */ @@ -9831,6 +9852,8 @@ export type VirtualHub = Resource & { preferredRoutingGateway?: PreferredRoutingGateway; /** The hubRoutingPreference of this VirtualHub. */ hubRoutingPreference?: HubRoutingPreference; + /** The VirtualHub Router autoscale configuration. */ + virtualRouterAutoScaleConfiguration?: VirtualRouterAutoScaleConfiguration; }; /** VpnGateway Resource. */ @@ -9926,6 +9949,40 @@ export type WebApplicationFirewallPolicy = Resource & { readonly pathBasedRules?: SubResource[]; }; +/** ExpressRouteProviderPort resource. */ +export type ExpressRouteProviderPort = Resource & { + /** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** + * The name of the port pair. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portPairDescriptor?: string; + /** + * The name of the primary port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly primaryAzurePort?: string; + /** + * The name of the secondary port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly secondaryAzurePort?: string; + /** The peering location of the port pair. */ + peeringLocation?: string; + /** Overprovisioning factor for the port pair. */ + overprovisionFactor?: number; + /** Bandwidth of the port in Mbps */ + portBandwidthInMbps?: number; + /** Used Bandwidth of the port in Mbps */ + usedBandwidthInMbps?: number; + /** Remaining Bandwidth of the port in Mbps */ + remainingBandwidthInMbps?: number; +}; + /** The visibility list of the private link service. */ export type PrivateLinkServicePropertiesVisibility = ResourceSet & {}; @@ -10101,7 +10158,8 @@ export type ApplicationGatewayTier = string; export enum KnownApplicationGatewaySslProtocol { TLSv10 = "TLSv1_0", TLSv11 = "TLSv1_1", - TLSv12 = "TLSv1_2" + TLSv12 = "TLSv1_2", + TLSv13 = "TLSv1_3" } /** @@ -10111,14 +10169,16 @@ export enum KnownApplicationGatewaySslProtocol { * ### Known values supported by the service * **TLSv1_0** \ * **TLSv1_1** \ - * **TLSv1_2** + * **TLSv1_2** \ + * **TLSv1_3** */ export type ApplicationGatewaySslProtocol = string; /** Known values of {@link ApplicationGatewaySslPolicyType} that the service accepts. */ export enum KnownApplicationGatewaySslPolicyType { Predefined = "Predefined", - Custom = "Custom" + Custom = "Custom", + CustomV2 = "CustomV2" } /** @@ -10127,7 +10187,8 @@ export enum KnownApplicationGatewaySslPolicyType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Predefined** \ - * **Custom** + * **Custom** \ + * **CustomV2** */ export type ApplicationGatewaySslPolicyType = string; @@ -10135,7 +10196,9 @@ export type ApplicationGatewaySslPolicyType = string; export enum KnownApplicationGatewaySslPolicyName { AppGwSslPolicy20150501 = "AppGwSslPolicy20150501", AppGwSslPolicy20170401 = "AppGwSslPolicy20170401", - AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S" + AppGwSslPolicy20170401S = "AppGwSslPolicy20170401S", + AppGwSslPolicy20220101 = "AppGwSslPolicy20220101", + AppGwSslPolicy20220101S = "AppGwSslPolicy20220101S" } /** @@ -10145,7 +10208,9 @@ export enum KnownApplicationGatewaySslPolicyName { * ### Known values supported by the service * **AppGwSslPolicy20150501** \ * **AppGwSslPolicy20170401** \ - * **AppGwSslPolicy20170401S** + * **AppGwSslPolicy20170401S** \ + * **AppGwSslPolicy20220101** \ + * **AppGwSslPolicy20220101S** */ export type ApplicationGatewaySslPolicyName = string; @@ -13019,7 +13084,8 @@ export enum KnownWebApplicationFirewallOperator { BeginsWith = "BeginsWith", EndsWith = "EndsWith", Regex = "Regex", - GeoMatch = "GeoMatch" + GeoMatch = "GeoMatch", + Any = "Any" } /** @@ -13037,7 +13103,8 @@ export enum KnownWebApplicationFirewallOperator { * **BeginsWith** \ * **EndsWith** \ * **Regex** \ - * **GeoMatch** + * **GeoMatch** \ + * **Any** */ export type WebApplicationFirewallOperator = string; @@ -13923,6 +13990,13 @@ export interface GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParam /** Contains response data for the generatevirtualwanvpnserverconfigurationvpnprofile operation. */ export type GeneratevirtualwanvpnserverconfigurationvpnprofileResponse = VpnProfileResponse; +/** Optional parameters. */ +export interface ExpressRouteProviderPortOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the expressRouteProviderPort operation. */ +export type ExpressRouteProviderPortResponse = ExpressRouteProviderPort; + /** Optional parameters. */ export interface PutBastionShareableLinkNextOptionalParams extends coreClient.OperationOptions {} @@ -19314,13 +19388,21 @@ export interface WebApplicationFirewallPoliciesListAllNextOptionalParams /** Contains response data for the listAllNext operation. */ export type WebApplicationFirewallPoliciesListAllNextResponse = WebApplicationFirewallPolicyListResult; +/** Optional parameters. */ +export interface ExpressRouteProviderPortsLocationListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type ExpressRouteProviderPortsLocationListResponse = ExpressRouteProviderPortListResult; + /** Optional parameters. */ export interface NetworkManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; - /** Api Version */ - apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/network/arm-network/src/models/mappers.ts b/sdk/network/arm-network/src/models/mappers.ts index 6b8c680c284b..d9f2933d924b 100644 --- a/sdk/network/arm-network/src/models/mappers.ts +++ b/sdk/network/arm-network/src/models/mappers.ts @@ -4385,6 +4385,13 @@ export const ExplicitProxySettings: coreClient.CompositeMapper = { name: "Number" } }, + enablePacFile: { + serializedName: "enablePacFile", + nullable: true, + type: { + name: "Boolean" + } + }, pacFilePort: { constraints: { InclusiveMaximum: 64000, @@ -12938,6 +12945,24 @@ export const VirtualHubRouteV2: coreClient.CompositeMapper = { } }; +export const VirtualRouterAutoScaleConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualRouterAutoScaleConfiguration", + modelProperties: { + minCapacity: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "minCapacity", + type: { + name: "Number" + } + } + } + } +}; + export const ListVirtualHubsResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -14229,6 +14254,34 @@ export const ManagedRuleOverride: coreClient.CompositeMapper = { } }; +export const ExpressRouteProviderPortListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRouteProviderPortListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteProviderPort" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const FirewallPolicyNatRuleCollectionAction: coreClient.CompositeMapper = { type: { name: "Composite", @@ -17269,6 +17322,16 @@ export const ApplicationGatewayRoutingRule: coreClient.CompositeMapper = { name: "String" } }, + priority: { + constraints: { + InclusiveMaximum: 20000, + InclusiveMinimum: 1 + }, + serializedName: "properties.priority", + type: { + name: "Number" + } + }, backendAddressPool: { serializedName: "properties.backendAddressPool", type: { @@ -26036,6 +26099,13 @@ export const VirtualHub: coreClient.CompositeMapper = { type: { name: "String" } + }, + virtualRouterAutoScaleConfiguration: { + serializedName: "properties.virtualRouterAutoScaleConfiguration", + type: { + name: "Composite", + className: "VirtualRouterAutoScaleConfiguration" + } } } } @@ -26280,6 +26350,74 @@ export const WebApplicationFirewallPolicy: coreClient.CompositeMapper = { } }; +export const ExpressRouteProviderPort: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRouteProviderPort", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + portPairDescriptor: { + serializedName: "properties.portPairDescriptor", + readOnly: true, + type: { + name: "String" + } + }, + primaryAzurePort: { + serializedName: "properties.primaryAzurePort", + readOnly: true, + type: { + name: "String" + } + }, + secondaryAzurePort: { + serializedName: "properties.secondaryAzurePort", + readOnly: true, + type: { + name: "String" + } + }, + peeringLocation: { + serializedName: "properties.peeringLocation", + type: { + name: "String" + } + }, + overprovisionFactor: { + serializedName: "properties.overprovisionFactor", + type: { + name: "Number" + } + }, + portBandwidthInMbps: { + serializedName: "properties.portBandwidthInMbps", + type: { + name: "Number" + } + }, + usedBandwidthInMbps: { + serializedName: "properties.usedBandwidthInMbps", + type: { + name: "Number" + } + }, + remainingBandwidthInMbps: { + serializedName: "properties.remainingBandwidthInMbps", + type: { + name: "Number" + } + } + } + } +}; + export const PrivateLinkServicePropertiesVisibility: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/network/arm-network/src/models/parameters.ts b/sdk/network/arm-network/src/models/parameters.ts index a3603e3291f1..b254c52ada68 100644 --- a/sdk/network/arm-network/src/models/parameters.ts +++ b/sdk/network/arm-network/src/models/parameters.ts @@ -183,7 +183,7 @@ export const applicationGatewayName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-08-01", + defaultValue: "2022-01-01", isConstant: true, serializedName: "api-version", type: { @@ -401,6 +401,17 @@ export const vpnClientParams: OperationParameter = { mapper: VirtualWanVpnProfileParametersMapper }; +export const providerport: OperationURLParameter = { + parameterPath: "providerport", + mapper: { + serializedName: "providerport", + required: true, + type: { + name: "String" + } + } +}; + export const cloudServiceName: OperationURLParameter = { parameterPath: "cloudServiceName", mapper: { @@ -461,6 +472,18 @@ export const virtualmachineIndex: OperationURLParameter = { } }; +export const apiVersion1: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2018-10-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const ipConfigurationName: OperationURLParameter = { parameterPath: "ipConfigurationName", mapper: { @@ -1999,3 +2022,13 @@ export const parameters77: OperationParameter = { parameterPath: "parameters", mapper: WebApplicationFirewallPolicyMapper }; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index 437567d7cb7b..b91c4b29955e 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -126,7 +126,8 @@ import { VirtualHubIpConfigurationImpl, HubRouteTablesImpl, RoutingIntentOperationsImpl, - WebApplicationFirewallPoliciesImpl + WebApplicationFirewallPoliciesImpl, + ExpressRouteProviderPortsLocationImpl } from "./operations"; import { ApplicationGateways, @@ -242,7 +243,8 @@ import { VirtualHubIpConfiguration, HubRouteTables, RoutingIntentOperations, - WebApplicationFirewallPolicies + WebApplicationFirewallPolicies, + ExpressRouteProviderPortsLocation } from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; @@ -273,6 +275,8 @@ import { VirtualWanVpnProfileParameters, GeneratevirtualwanvpnserverconfigurationvpnprofileOptionalParams, GeneratevirtualwanvpnserverconfigurationvpnprofileResponse, + ExpressRouteProviderPortOptionalParams, + ExpressRouteProviderPortResponse, PutBastionShareableLinkNextResponse, GetBastionShareableLinkNextResponse, GetActiveSessionsNextResponse, @@ -282,7 +286,6 @@ import { /// export class NetworkManagementClient extends coreClient.ServiceClient { $host: string; - apiVersion: string; subscriptionId: string; /** @@ -313,7 +316,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-network/28.0.1`; + const packageDetails = `azsdk-js-arm-network/29.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -360,7 +363,6 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-08-01"; this.applicationGateways = new ApplicationGatewaysImpl(this); this.applicationGatewayPrivateLinkResources = new ApplicationGatewayPrivateLinkResourcesImpl( this @@ -539,6 +541,9 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this.webApplicationFirewallPolicies = new WebApplicationFirewallPoliciesImpl( this ); + this.expressRouteProviderPortsLocation = new ExpressRouteProviderPortsLocationImpl( + this + ); } /** @@ -1254,6 +1259,21 @@ export class NetworkManagementClient extends coreClient.ServiceClient { return poller.pollUntilDone(); } + /** + * Retrieves detail of a provider port. + * @param providerport The name of the provider port. + * @param options The options parameters. + */ + expressRouteProviderPort( + providerport: string, + options?: ExpressRouteProviderPortOptionalParams + ): Promise { + return this.sendOperationRequest( + { providerport, options }, + expressRouteProviderPortOperationSpec + ); + } + /** * PutBastionShareableLinkNext * @param resourceGroupName The name of the resource group. @@ -1453,6 +1473,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { hubRouteTables: HubRouteTables; routingIntentOperations: RoutingIntentOperations; webApplicationFirewallPolicies: WebApplicationFirewallPolicies; + expressRouteProviderPortsLocation: ExpressRouteProviderPortsLocation; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -1670,6 +1691,27 @@ const generatevirtualwanvpnserverconfigurationvpnprofileOperationSpec: coreClien mediaType: "json", serializer }; +const expressRouteProviderPortOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRouteProviderPort + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.providerport + ], + headerParameters: [Parameters.accept], + serializer +}; const putBastionShareableLinkNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts b/sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts new file mode 100644 index 000000000000..d23c32ec08c4 --- /dev/null +++ b/sdk/network/arm-network/src/operations/expressRouteProviderPortsLocation.ts @@ -0,0 +1,61 @@ +/* + * 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 { ExpressRouteProviderPortsLocation } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { + ExpressRouteProviderPortsLocationListOptionalParams, + ExpressRouteProviderPortsLocationListResponse +} from "../models"; + +/** Class containing ExpressRouteProviderPortsLocation operations. */ +export class ExpressRouteProviderPortsLocationImpl + implements ExpressRouteProviderPortsLocation { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class ExpressRouteProviderPortsLocation class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Retrieves all the ExpressRouteProviderPorts in a subscription. + * @param options The options parameters. + */ + list( + options?: ExpressRouteProviderPortsLocationListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRouteProviderPortListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/network/arm-network/src/operations/index.ts b/sdk/network/arm-network/src/operations/index.ts index 75a18887f6c2..61d774c07372 100644 --- a/sdk/network/arm-network/src/operations/index.ts +++ b/sdk/network/arm-network/src/operations/index.ts @@ -120,3 +120,4 @@ export * from "./virtualHubIpConfiguration"; export * from "./hubRouteTables"; export * from "./routingIntentOperations"; export * from "./webApplicationFirewallPolicies"; +export * from "./expressRouteProviderPortsLocation"; diff --git a/sdk/network/arm-network/src/operations/networkInterfaces.ts b/sdk/network/arm-network/src/operations/networkInterfaces.ts index 6ff0e34ae7ea..fe05626965dc 100644 --- a/sdk/network/arm-network/src/operations/networkInterfaces.ts +++ b/sdk/network/arm-network/src/operations/networkInterfaces.ts @@ -1629,7 +1629,7 @@ const listVirtualMachineScaleSetVMNetworkInterfacesOperationSpec: coreClient.Ope bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1652,7 +1652,7 @@ const listVirtualMachineScaleSetNetworkInterfacesOperationSpec: coreClient.Opera bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1674,7 +1674,7 @@ const getVirtualMachineScaleSetNetworkInterfaceOperationSpec: coreClient.Operati bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], + queryParameters: [Parameters.expand, Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1698,7 +1698,7 @@ const listVirtualMachineScaleSetIpConfigurationsOperationSpec: coreClient.Operat bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], + queryParameters: [Parameters.expand, Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1722,7 +1722,7 @@ const getVirtualMachineScaleSetIpConfigurationOperationSpec: coreClient.Operatio bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], + queryParameters: [Parameters.expand, Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1832,7 +1832,7 @@ const listVirtualMachineScaleSetVMNetworkInterfacesNextOperationSpec: coreClient bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1855,7 +1855,7 @@ const listVirtualMachineScaleSetNetworkInterfacesNextOperationSpec: coreClient.O bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1877,7 +1877,7 @@ const listVirtualMachineScaleSetIpConfigurationsNextOperationSpec: coreClient.Op bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], + queryParameters: [Parameters.expand, Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operations/publicIPAddresses.ts b/sdk/network/arm-network/src/operations/publicIPAddresses.ts index 8e4bac6fec69..57b6cb10a861 100644 --- a/sdk/network/arm-network/src/operations/publicIPAddresses.ts +++ b/sdk/network/arm-network/src/operations/publicIPAddresses.ts @@ -1280,7 +1280,7 @@ const listVirtualMachineScaleSetPublicIPAddressesOperationSpec: coreClient.Opera bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1302,7 +1302,7 @@ const listVirtualMachineScaleSetVMPublicIPAddressesOperationSpec: coreClient.Ope bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1327,7 +1327,7 @@ const getVirtualMachineScaleSetPublicIPAddressOperationSpec: coreClient.Operatio bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], + queryParameters: [Parameters.expand, Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1440,7 +1440,7 @@ const listVirtualMachineScaleSetPublicIPAddressesNextOperationSpec: coreClient.O bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1462,7 +1462,7 @@ const listVirtualMachineScaleSetVMPublicIPAddressesNextOperationSpec: coreClient bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts new file mode 100644 index 000000000000..500e4f2d8a07 --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/expressRouteProviderPortsLocation.ts @@ -0,0 +1,23 @@ +/* + * 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 { + ExpressRouteProviderPortsLocationListOptionalParams, + ExpressRouteProviderPortsLocationListResponse +} from "../models"; + +/** Interface representing a ExpressRouteProviderPortsLocation. */ +export interface ExpressRouteProviderPortsLocation { + /** + * Retrieves all the ExpressRouteProviderPorts in a subscription. + * @param options The options parameters. + */ + list( + options?: ExpressRouteProviderPortsLocationListOptionalParams + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/index.ts b/sdk/network/arm-network/src/operationsInterfaces/index.ts index 75a18887f6c2..61d774c07372 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/index.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/index.ts @@ -120,3 +120,4 @@ export * from "./virtualHubIpConfiguration"; export * from "./hubRouteTables"; export * from "./routingIntentOperations"; export * from "./webApplicationFirewallPolicies"; +export * from "./expressRouteProviderPortsLocation"; 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"