diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3df37c100915..1648c08ba512 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12153,28 +12153,27 @@ packages: dev: false file:projects/arm-network.tgz: - resolution: {integrity: sha512-N2yS4vJp7Ff8fgBcUtlrftcIaXZIko266Z6pG19rHmsgvcuUXwF4VDgQKkFT/5ySGKxGpu7OCh0iTuaP4Z4H0Q==, tarball: file:projects/arm-network.tgz} + resolution: {integrity: sha512-dZ44ZqXB5L8o78ZG6w7mt+pbqPifYYBJar2ocQYcjKpPK/I/3lgvWdCpB41omEC2vHbPTQUjfCnAKB7KQfLb9A==, tarball: file:projects/arm-network.tgz} name: '@rush-temp/arm-network' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 - '@microsoft/api-extractor': 7.18.11 - '@rollup/plugin-commonjs': 21.1.0_rollup@2.72.0 - '@rollup/plugin-json': 4.1.0_rollup@2.72.0 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.72.0 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.72.0 + '@microsoft/api-extractor': 7.23.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.72.0 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.72.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.4.0 typescript: 4.2.4 uglify-js: 3.15.4 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index 5d4b23e852ac..b0f5cad50dd7 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,15 +1,87 @@ # Release History + +## 28.0.0 (2022-05-10) + +**Features** -## 27.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group ConfigurationPolicyGroups + - Added operation group ExpressRoutePortAuthorizations + - Added operation FirewallPolicies.updateTags + - Added Interface ConfigurationPolicyGroupsCreateOrUpdateOptionalParams + - Added Interface ConfigurationPolicyGroupsDeleteOptionalParams + - Added Interface ConfigurationPolicyGroupsGetOptionalParams + - Added Interface ConfigurationPolicyGroupsListByVpnServerConfigurationNextOptionalParams + - Added Interface ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + - Added Interface ExpressRoutePortAuthorizationListResult + - Added Interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + - Added Interface ExpressRoutePortAuthorizationsDeleteOptionalParams + - Added Interface ExpressRoutePortAuthorizationsGetOptionalParams + - Added Interface ExpressRoutePortAuthorizationsListNextOptionalParams + - Added Interface ExpressRoutePortAuthorizationsListOptionalParams + - Added Interface FirewallPoliciesUpdateTagsOptionalParams + - Added Interface GatewayCustomBgpIpAddressIpConfiguration + - Added Interface ListVpnServerConfigurationPolicyGroupsResult + - Added Interface VpnServerConfigurationPolicyGroupMember + - Added Type Alias ApplicationGatewayBackendSettings + - Added Type Alias ApplicationGatewayListener + - Added Type Alias ApplicationGatewayRoutingRule + - Added Type Alias ConfigurationPolicyGroupsCreateOrUpdateResponse + - Added Type Alias ConfigurationPolicyGroupsGetResponse + - Added Type Alias ConfigurationPolicyGroupsListByVpnServerConfigurationNextResponse + - Added Type Alias ConfigurationPolicyGroupsListByVpnServerConfigurationResponse + - Added Type Alias ExpressRoutePortAuthorization + - Added Type Alias ExpressRoutePortAuthorizationsCreateOrUpdateResponse + - Added Type Alias ExpressRoutePortAuthorizationsGetResponse + - Added Type Alias ExpressRoutePortAuthorizationsListNextResponse + - Added Type Alias ExpressRoutePortAuthorizationsListResponse + - Added Type Alias ExpressRoutePortAuthorizationUseStatus + - Added Type Alias FirewallPoliciesUpdateTagsResponse + - Added Type Alias FirewallPolicyIdpsQuerySortOrder + - Added Type Alias FirewallPolicyIdpsSignatureDirection + - Added Type Alias FirewallPolicyIdpsSignatureMode + - Added Type Alias FirewallPolicyIdpsSignatureSeverity + - Added Type Alias HubRoutingPreference + - Added Type Alias LoadBalancerBackendAddressAdminState + - Added Type Alias NetworkInterfaceAuxiliaryMode + - Added Type Alias VpnPolicyMemberAttributeType + - Added Type Alias VpnServerConfigurationPolicyGroup + - Interface FirewallPolicyIntrusionDetectionConfiguration has a new optional parameter privateRanges + - Interface LoadBalancerBackendAddress has a new optional parameter adminState + - Interface NetworkManagementClientOptionalParams has a new optional parameter apiVersion + - Class NetworkManagementClient has a new parameter apiVersion + - Class NetworkManagementClient has a new parameter configurationPolicyGroups + - Class NetworkManagementClient has a new parameter expressRoutePortAuthorizations + - Type Alias ApplicationGateway has a new parameter backendSettingsCollection + - Type Alias ApplicationGateway has a new parameter listeners + - Type Alias ApplicationGateway has a new parameter routingRules + - Type Alias ApplicationGatewayProbe has a new parameter pickHostNameFromBackendSettings + - Type Alias BackendAddressPool has a new parameter drainPeriodInSeconds + - Type Alias ExpressRouteCircuit has a new parameter authorizationKey + - Type Alias NetworkInterface has a new parameter auxiliaryMode + - Type Alias P2SConnectionConfiguration has a new parameter configurationPolicyGroupAssociations + - Type Alias P2SConnectionConfiguration has a new parameter previousConfigurationPolicyGroupAssociations + - Type Alias VirtualHub has a new parameter hubRoutingPreference + - Type Alias VirtualNetworkGatewayConnection has a new parameter gatewayCustomBgpIpAddresses + - Type Alias VirtualNetworkGatewayConnectionListEntity has a new parameter gatewayCustomBgpIpAddresses + - Type Alias VpnServerConfiguration has a new parameter configurationPolicyGroups + - Type Alias VpnSiteLinkConnection has a new parameter vpnGatewayCustomBgpAddresses + - Added Enum KnownExpressRoutePortAuthorizationUseStatus + - Added Enum KnownFirewallPolicyIdpsQuerySortOrder + - Added Enum KnownHubRoutingPreference + - Added Enum KnownLoadBalancerBackendAddressAdminState + - Added Enum KnownNetworkInterfaceAuxiliaryMode + - Added Enum KnownVpnPolicyMemberAttributeType + - Enum KnownApplicationGatewayProtocol has a new value Tcp + - Enum KnownApplicationGatewayProtocol has a new value Tls -### Other Changes +**Breaking Changes** + - Removed Enum KnownOrderByOrder + - Removed Enum KnownSingleQueryResultDirection + - Removed Enum KnownSingleQueryResultMode + - Removed Enum KnownSingleQueryResultSeverity + + ## 27.0.0 (2022-04-27) **Features** diff --git a/sdk/network/arm-network/README.md b/sdk/network/arm-network/README.md index ee877b144500..2b7ada1bd0d8 100644 --- a/sdk/network/arm-network/README.md +++ b/sdk/network/arm-network/README.md @@ -16,8 +16,6 @@ Network Client - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { NetworkManagementClient } = require("@azure/arm-network"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkManagementClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new NetworkManagementClient(credential, subscriptionId); ``` diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json index bd362f3d5ef7..63ea4d9087fa 100644 --- a/sdk/network/arm-network/_meta.json +++ b/sdk/network/arm-network/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", - "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", + "commit": "6844004a743fa1475208c788989156b88ee29a45", + "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=/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.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" +} \ No newline at end of file diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 62b2f57b3004..5e81b28f159e 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": "27.0.1", + "version": "28.0.0", "engines": { "node": ">=12.0.0" }, @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.5.0", + "@azure/core-client": "^1.0.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,14 +28,14 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-network.d.ts", "devDependencies": { - "@microsoft/api-extractor": "7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/networkManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "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 71e06aa743b0..be02212d83a4 100644 --- a/sdk/network/arm-network/review/arm-network.api.md +++ b/sdk/network/arm-network/review/arm-network.api.md @@ -43,10 +43,13 @@ export type ApplicationGateway = Resource & { probes?: ApplicationGatewayProbe[]; backendAddressPools?: ApplicationGatewayBackendAddressPool[]; backendHttpSettingsCollection?: ApplicationGatewayBackendHttpSettings[]; + backendSettingsCollection?: ApplicationGatewayBackendSettings[]; httpListeners?: ApplicationGatewayHttpListener[]; + listeners?: ApplicationGatewayListener[]; sslProfiles?: ApplicationGatewaySslProfile[]; urlPathMaps?: ApplicationGatewayUrlPathMap[]; requestRoutingRules?: ApplicationGatewayRequestRoutingRule[]; + routingRules?: ApplicationGatewayRoutingRule[]; rewriteRuleSets?: ApplicationGatewayRewriteRuleSet[]; redirectConfigurations?: ApplicationGatewayRedirectConfiguration[]; webApplicationFirewallConfiguration?: ApplicationGatewayWebApplicationFirewallConfiguration; @@ -169,6 +172,21 @@ export type ApplicationGatewayBackendHttpSettings = SubResource & { readonly provisioningState?: ProvisioningState; }; +// @public +export type ApplicationGatewayBackendSettings = SubResource & { + name?: string; + readonly etag?: string; + readonly type?: string; + port?: number; + protocol?: ApplicationGatewayProtocol; + timeout?: number; + probe?: SubResource; + trustedRootCertificates?: SubResource[]; + hostName?: string; + pickHostNameFromBackendAddress?: boolean; + readonly provisioningState?: ProvisioningState; +}; + // @public export interface ApplicationGatewayClientAuthConfiguration { verifyClientCertIssuerDN?: boolean; @@ -290,6 +308,19 @@ export type ApplicationGatewayIPConfiguration = SubResource & { readonly provisioningState?: ProvisioningState; }; +// @public +export type ApplicationGatewayListener = SubResource & { + name?: string; + readonly etag?: string; + readonly type?: string; + frontendIPConfiguration?: SubResource; + frontendPort?: SubResource; + protocol?: ApplicationGatewayProtocol; + sslCertificate?: SubResource; + sslProfile?: SubResource; + readonly provisioningState?: ProvisioningState; +}; + // @public export interface ApplicationGatewayListResult { nextLink?: string; @@ -479,6 +510,7 @@ export type ApplicationGatewayProbe = SubResource & { timeout?: number; unhealthyThreshold?: number; pickHostNameFromBackendHttpSettings?: boolean; + pickHostNameFromBackendSettings?: boolean; minServers?: number; match?: ApplicationGatewayProbeHealthResponseMatch; readonly provisioningState?: ProvisioningState; @@ -563,6 +595,18 @@ export type ApplicationGatewayRewriteRuleSet = SubResource & { readonly provisioningState?: ProvisioningState; }; +// @public +export type ApplicationGatewayRoutingRule = SubResource & { + name?: string; + readonly etag?: string; + readonly type?: string; + ruleType?: ApplicationGatewayRequestRoutingRuleType; + backendAddressPool?: SubResource; + backendSettings?: SubResource; + listener?: SubResource; + readonly provisioningState?: ProvisioningState; +}; + // @public export interface ApplicationGateways { beginBackendHealth(resourceGroupName: string, applicationGatewayName: string, options?: ApplicationGatewaysBackendHealthOptionalParams): Promise, ApplicationGatewaysBackendHealthResponse>>; @@ -1532,6 +1576,7 @@ export type BackendAddressPool = SubResource & { readonly outboundRules?: SubResource[]; readonly inboundNatRules?: SubResource[]; readonly provisioningState?: ProvisioningState; + drainPeriodInSeconds?: number; }; // @public @@ -1822,6 +1867,52 @@ export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserass readonly principalId?: string; } +// @public +export interface ConfigurationPolicyGroups { + beginCreateOrUpdate(resourceGroupName: string, vpnServerConfigurationName: string, configurationPolicyGroupName: string, vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams): Promise, ConfigurationPolicyGroupsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vpnServerConfigurationName: string, configurationPolicyGroupName: string, vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vpnServerConfigurationName: string, configurationPolicyGroupName: string, options?: ConfigurationPolicyGroupsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vpnServerConfigurationName: string, configurationPolicyGroupName: string, options?: ConfigurationPolicyGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, vpnServerConfigurationName: string, configurationPolicyGroupName: string, options?: ConfigurationPolicyGroupsGetOptionalParams): Promise; + listByVpnServerConfiguration(resourceGroupName: string, vpnServerConfigurationName: string, options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConfigurationPolicyGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConfigurationPolicyGroupsCreateOrUpdateResponse = VpnServerConfigurationPolicyGroup; + +// @public +export interface ConfigurationPolicyGroupsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ConfigurationPolicyGroupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationPolicyGroupsGetResponse = VpnServerConfigurationPolicyGroup; + +// @public +export interface ConfigurationPolicyGroupsListByVpnServerConfigurationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationPolicyGroupsListByVpnServerConfigurationNextResponse = ListVpnServerConfigurationPolicyGroupsResult; + +// @public +export interface ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationPolicyGroupsListByVpnServerConfigurationResponse = ListVpnServerConfigurationPolicyGroupsResult; + // @public export interface ConnectionMonitor { autoStart?: boolean; @@ -2814,6 +2905,7 @@ export type ExpressRouteCircuit = Resource & { readonly provisioningState?: ProvisioningState; gatewayManagerEtag?: string; globalReachEnabled?: boolean; + authorizationKey?: string; }; // @public @@ -3506,7 +3598,7 @@ export type ExpressRouteCrossConnectionsUpdateTagsResponse = ExpressRouteCrossCo export type ExpressRouteGateway = Resource & { readonly etag?: string; autoScaleConfiguration?: ExpressRouteGatewayPropertiesAutoScaleConfiguration; - readonly expressRouteConnections?: ExpressRouteConnection[]; + expressRouteConnections?: ExpressRouteConnection[]; readonly provisioningState?: ProvisioningState; virtualHub?: VirtualHubId; }; @@ -3675,6 +3767,72 @@ export type ExpressRoutePort = Resource & { readonly resourceGuid?: string; }; +// @public +export type ExpressRoutePortAuthorization = SubResource & { + name?: string; + readonly etag?: string; + readonly type?: string; + readonly authorizationKey?: string; + readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; + readonly circuitResourceUri?: string; + readonly provisioningState?: ProvisioningState; +}; + +// @public +export interface ExpressRoutePortAuthorizationListResult { + nextLink?: string; + value?: ExpressRoutePortAuthorization[]; +} + +// @public +export interface ExpressRoutePortAuthorizations { + beginCreateOrUpdate(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, authorizationParameters: ExpressRoutePortAuthorization, options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams): Promise, ExpressRoutePortAuthorizationsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, authorizationParameters: ExpressRoutePortAuthorization, options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, options?: ExpressRoutePortAuthorizationsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, options?: ExpressRoutePortAuthorizationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, options?: ExpressRoutePortAuthorizationsGetOptionalParams): Promise; + list(resourceGroupName: string, expressRoutePortName: string, options?: ExpressRoutePortAuthorizationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExpressRoutePortAuthorizationsCreateOrUpdateResponse = ExpressRoutePortAuthorization; + +// @public +export interface ExpressRoutePortAuthorizationsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ExpressRoutePortAuthorizationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRoutePortAuthorizationsGetResponse = ExpressRoutePortAuthorization; + +// @public +export interface ExpressRoutePortAuthorizationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRoutePortAuthorizationsListNextResponse = ExpressRoutePortAuthorizationListResult; + +// @public +export interface ExpressRoutePortAuthorizationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRoutePortAuthorizationsListResponse = ExpressRoutePortAuthorizationListResult; + +// @public +export type ExpressRoutePortAuthorizationUseStatus = string; + // @public export interface ExpressRoutePortListResult { nextLink?: string; @@ -3870,6 +4028,7 @@ export interface FirewallPolicies { get(resourceGroupName: string, firewallPolicyName: string, options?: FirewallPoliciesGetOptionalParams): Promise; list(resourceGroupName: string, options?: FirewallPoliciesListOptionalParams): PagedAsyncIterableIterator; listAll(options?: FirewallPoliciesListAllOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, firewallPolicyName: string, parameters: TagsObject, options?: FirewallPoliciesUpdateTagsOptionalParams): Promise; } // @public @@ -3923,6 +4082,13 @@ export interface FirewallPoliciesListOptionalParams extends coreClient.Operation // @public export type FirewallPoliciesListResponse = FirewallPolicyListResult; +// @public +export interface FirewallPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallPoliciesUpdateTagsResponse = FirewallPolicy; + // @public export type FirewallPolicy = Resource & { readonly etag?: string; @@ -3965,11 +4131,23 @@ export interface FirewallPolicyFilterRuleCollectionAction { // @public export type FirewallPolicyFilterRuleCollectionActionType = string; +// @public +export type FirewallPolicyIdpsQuerySortOrder = string; + +// @public +export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2; + +// @public +export type FirewallPolicyIdpsSignatureMode = 0 | 1 | 2; + // @public export interface FirewallPolicyIdpsSignatures { list(resourceGroupName: string, firewallPolicyName: string, parameters: IdpsQueryObject, options?: FirewallPolicyIdpsSignaturesListOptionalParams): Promise; } +// @public +export type FirewallPolicyIdpsSignatureSeverity = 1 | 2 | 3; + // @public export interface FirewallPolicyIdpsSignaturesFilterValues { list(resourceGroupName: string, firewallPolicyName: string, parameters: SignatureOverridesFilterValuesQuery, options?: FirewallPolicyIdpsSignaturesFilterValuesListOptionalParams): Promise; @@ -4053,6 +4231,7 @@ export interface FirewallPolicyIntrusionDetectionBypassTrafficSpecifications { // @public export interface FirewallPolicyIntrusionDetectionConfiguration { bypassTrafficSettings?: FirewallPolicyIntrusionDetectionBypassTrafficSpecifications[]; + privateRanges?: string[]; signatureOverrides?: FirewallPolicyIntrusionDetectionSignatureSpecification[]; } @@ -4347,6 +4526,12 @@ export type FrontendIPConfiguration = SubResource & { readonly provisioningState?: ProvisioningState; }; +// @public +export interface GatewayCustomBgpIpAddressIpConfiguration { + customBgpIpAddress: string; + ipConfigurationId: string; +} + // @public export interface GatewayLoadBalancerTunnelInterface { identifier?: number; @@ -4559,6 +4744,9 @@ export interface HubRouteTablesListOptionalParams extends coreClient.OperationOp // @public export type HubRouteTablesListResponse = ListHubRouteTablesResult; +// @public +export type HubRoutingPreference = string; + // @public export type HubVirtualNetworkConnection = SubResource & { name?: string; @@ -5103,7 +5291,11 @@ export enum KnownApplicationGatewayProtocol { // (undocumented) Http = "Http", // (undocumented) - Https = "Https" + Https = "Https", + // (undocumented) + Tcp = "Tcp", + // (undocumented) + Tls = "Tls" } // @public @@ -5692,6 +5884,14 @@ export enum KnownExpressRoutePeeringType { MicrosoftPeering = "MicrosoftPeering" } +// @public +export enum KnownExpressRoutePortAuthorizationUseStatus { + // (undocumented) + Available = "Available", + // (undocumented) + InUse = "InUse" +} + // @public export enum KnownExpressRoutePortsEncapsulation { // (undocumented) @@ -5714,6 +5914,14 @@ export enum KnownFirewallPolicyFilterRuleCollectionActionType { Deny = "Deny" } +// @public +export enum KnownFirewallPolicyIdpsQuerySortOrder { + // (undocumented) + Ascending = "Ascending", + // (undocumented) + Descending = "Descending" +} + // @public export enum KnownFirewallPolicyIntrusionDetectionProtocol { // (undocumented) @@ -5842,6 +6050,16 @@ export enum KnownHubBgpConnectionStatus { Unknown = "Unknown" } +// @public +export enum KnownHubRoutingPreference { + // (undocumented) + ASPath = "ASPath", + // (undocumented) + ExpressRoute = "ExpressRoute", + // (undocumented) + VpnGateway = "VpnGateway" +} + // @public export enum KnownHubVirtualNetworkConnectionStatus { // (undocumented) @@ -5988,6 +6206,18 @@ export enum KnownIssueType { UserDefinedRoute = "UserDefinedRoute" } +// @public +export enum KnownLoadBalancerBackendAddressAdminState { + // (undocumented) + Down = "Down", + // (undocumented) + Drain = "Drain", + // (undocumented) + None = "None", + // (undocumented) + Up = "Up" +} + // @public export enum KnownLoadBalancerOutboundRuleProtocol { // (undocumented) @@ -6038,6 +6268,16 @@ export enum KnownNatGatewaySkuName { Standard = "Standard" } +// @public +export enum KnownNetworkInterfaceAuxiliaryMode { + // (undocumented) + Floating = "Floating", + // (undocumented) + MaxConnections = "MaxConnections", + // (undocumented) + None = "None" +} + // @public export enum KnownNetworkInterfaceMigrationPhase { // (undocumented) @@ -6098,14 +6338,6 @@ export enum KnownOfficeTrafficCategory { OptimizeAndAllow = "OptimizeAndAllow" } -// @public -export enum KnownOrderByOrder { - // (undocumented) - Ascending = "Ascending", - // (undocumented) - Descending = "Descending" -} - // @public export enum KnownOrigin { // (undocumented) @@ -6450,36 +6682,6 @@ export enum KnownSeverity { Warning = "Warning" } -// @public -export enum KnownSingleQueryResultDirection { - // (undocumented) - One = 1, - // (undocumented) - Two = 2, - // (undocumented) - Zero = 0 -} - -// @public -export enum KnownSingleQueryResultMode { - // (undocumented) - One = 1, - // (undocumented) - Two = 2, - // (undocumented) - Zero = 0 -} - -// @public -export enum KnownSingleQueryResultSeverity { - // (undocumented) - One = 1, - // (undocumented) - Three = 3, - // (undocumented) - Two = 2 -} - // @public export enum KnownSyncRemoteAddressSpace { // (undocumented) @@ -6782,6 +6984,16 @@ export enum KnownVpnNatRuleType { Static = "Static" } +// @public +export enum KnownVpnPolicyMemberAttributeType { + // (undocumented) + AADGroupId = "AADGroupId", + // (undocumented) + CertificateGroupId = "CertificateGroupId", + // (undocumented) + RadiusAzureGroupId = "RadiusAzureGroupId" +} + // @public export enum KnownVpnType { // (undocumented) @@ -6980,6 +7192,12 @@ export interface ListVpnGatewaysResult { value?: VpnGateway[]; } +// @public +export interface ListVpnServerConfigurationPolicyGroupsResult { + nextLink?: string; + value?: VpnServerConfigurationPolicyGroup[]; +} + // @public export interface ListVpnServerConfigurationsResult { nextLink?: string; @@ -7022,6 +7240,7 @@ export type LoadBalancer = Resource & { // @public export interface LoadBalancerBackendAddress { + adminState?: LoadBalancerBackendAddressAdminState; readonly inboundNatRulesPortMapping?: NatRulePortMapping[]; ipAddress?: string; loadBalancerFrontendIPConfiguration?: SubResource; @@ -7031,6 +7250,9 @@ export interface LoadBalancerBackendAddress { virtualNetwork?: SubResource; } +// @public +export type LoadBalancerBackendAddressAdminState = string; + // @public export interface LoadBalancerBackendAddressPoolListResult { readonly nextLink?: string; @@ -7757,6 +7979,7 @@ export type NetworkInterface = Resource & { nicType?: NetworkInterfaceNicType; privateLinkService?: PrivateLinkService; migrationPhase?: NetworkInterfaceMigrationPhase; + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; }; // @public @@ -7765,6 +7988,9 @@ export interface NetworkInterfaceAssociation { securityRules?: SecurityRule[]; } +// @public +export type NetworkInterfaceAuxiliaryMode = string; + // @public export interface NetworkInterfaceDnsSettings { readonly appliedDnsServers?: string[]; @@ -8135,6 +8361,8 @@ 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; @@ -8168,6 +8396,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { bgpServiceCommunities: BgpServiceCommunities; checkDnsNameAvailability(location: string, domainNameLabel: string, options?: CheckDnsNameAvailabilityOptionalParams): Promise; // (undocumented) + configurationPolicyGroups: ConfigurationPolicyGroups; + // (undocumented) connectionMonitors: ConnectionMonitors; // (undocumented) customIPPrefixes: CustomIPPrefixes; @@ -8198,6 +8428,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // (undocumented) expressRouteLinks: ExpressRouteLinks; // (undocumented) + expressRoutePortAuthorizations: ExpressRoutePortAuthorizations; + // (undocumented) expressRoutePorts: ExpressRoutePorts; // (undocumented) expressRoutePortsLocations: ExpressRoutePortsLocations; @@ -8375,6 +8607,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // @public export interface NetworkManagementClientOptionalParams extends coreClient.ServiceClientOptions { $host?: string; + apiVersion?: string; endpoint?: string; } @@ -8979,12 +9212,9 @@ export type OperationsListResponse = OperationListResult; // @public export interface OrderBy { field?: string; - order?: OrderByOrder; + order?: FirewallPolicyIdpsQuerySortOrder; } -// @public -export type OrderByOrder = string; - // @public export type Origin = string; @@ -9026,6 +9256,8 @@ export type P2SConnectionConfiguration = SubResource & { vpnClientAddressPool?: AddressSpace; routingConfiguration?: RoutingConfiguration; enableInternetSecurity?: boolean; + readonly configurationPolicyGroupAssociations?: SubResource[]; + readonly previousConfigurationPolicyGroupAssociations?: VpnServerConfigurationPolicyGroup[]; readonly provisioningState?: ProvisioningState; }; @@ -11191,26 +11423,17 @@ export interface SignaturesOverridesProperties { export interface SingleQueryResult { description?: string; destinationPorts?: string[]; - direction?: SingleQueryResultDirection; + direction?: FirewallPolicyIdpsSignatureDirection; group?: string; inheritedFromParentPolicy?: boolean; lastUpdated?: string; - mode?: SingleQueryResultMode; + mode?: FirewallPolicyIdpsSignatureMode; protocol?: string; - severity?: SingleQueryResultSeverity; + severity?: FirewallPolicyIdpsSignatureSeverity; signatureId?: number; sourcePorts?: string[]; } -// @public -export type SingleQueryResultDirection = number; - -// @public -export type SingleQueryResultMode = number; - -// @public -export type SingleQueryResultSeverity = number; - // @public export interface Sku { name?: BastionHostSkuName; @@ -11632,6 +11855,7 @@ export type VirtualHub = Resource & { virtualRouterIps?: string[]; allowBranchToBranchTraffic?: boolean; preferredRoutingGateway?: PreferredRoutingGateway; + hubRoutingPreference?: HubRoutingPreference; }; // @public @@ -12009,6 +12233,7 @@ export type VirtualNetworkGatewayConnection = Resource & { readonly ingressBytesTransferred?: number; peer?: SubResource; enableBgp?: boolean; + gatewayCustomBgpIpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; useLocalAzureIpAddress?: boolean; usePolicyBasedTrafficSelectors?: boolean; ipsecPolicies?: IpsecPolicy[]; @@ -12036,6 +12261,7 @@ export type VirtualNetworkGatewayConnectionListEntity = Resource & { readonly ingressBytesTransferred?: number; peer?: SubResource; enableBgp?: boolean; + gatewayCustomBgpIpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; usePolicyBasedTrafficSelectors?: boolean; ipsecPolicies?: IpsecPolicy[]; trafficSelectorPolicies?: TrafficSelectorPolicy[]; @@ -13541,6 +13767,9 @@ export interface VpnPacketCaptureStopParameters { sasUrl?: string; } +// @public +export type VpnPolicyMemberAttributeType = string; + // @public export interface VpnProfileResponse { profileUrl?: string; @@ -13575,9 +13804,29 @@ export type VpnServerConfiguration = Resource & { aadAuthenticationParameters?: AadAuthenticationParameters; readonly provisioningState?: string; readonly p2SVpnGateways?: P2SVpnGateway[]; + configurationPolicyGroups?: VpnServerConfigurationPolicyGroup[]; readonly etagPropertiesEtag?: string; }; +// @public +export type VpnServerConfigurationPolicyGroup = SubResource & { + readonly etag?: string; + name?: string; + readonly type?: string; + isDefault?: boolean; + priority?: number; + policyMembers?: VpnServerConfigurationPolicyGroupMember[]; + readonly p2SConnectionConfigurations?: SubResource[]; + readonly provisioningState?: ProvisioningState; +}; + +// @public +export interface VpnServerConfigurationPolicyGroupMember { + attributeType?: VpnPolicyMemberAttributeType; + attributeValue?: string; + name?: string; +} + // @public export interface VpnServerConfigurations { beginCreateOrUpdate(resourceGroupName: string, vpnServerConfigurationName: string, vpnServerConfigurationParameters: VpnServerConfiguration, options?: VpnServerConfigurationsCreateOrUpdateOptionalParams): Promise, VpnServerConfigurationsCreateOrUpdateResponse>>; @@ -13726,6 +13975,7 @@ export type VpnSiteLinkConnection = SubResource & { connectionBandwidth?: number; sharedKey?: string; enableBgp?: boolean; + vpnGatewayCustomBgpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; usePolicyBasedTrafficSelectors?: boolean; ipsecPolicies?: IpsecPolicy[]; enableRateLimiting?: boolean; diff --git a/sdk/network/arm-network/rollup.config.js b/sdk/network/arm-network/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/network/arm-network/rollup.config.js +++ b/sdk/network/arm-network/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index 2ae14bfa640b..bda4e4888ccc 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -296,6 +296,8 @@ export interface LoadBalancerBackendAddress { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly inboundNatRulesPortMapping?: NatRulePortMapping[]; + /** A list of administrative states which once set can override health probe so that Load Balancer will always forward new connections to backend, or deny new connections and reset existing connections. */ + adminState?: LoadBalancerBackendAddressAdminState; } /** Individual port mappings for inbound NAT rule created for backend pool. */ @@ -1502,6 +1504,14 @@ export interface GenerateExpressRoutePortsLOAResult { encodedContent?: string; } +/** Response for ListExpressRoutePortAuthorizations API service call. */ +export interface ExpressRoutePortAuthorizationListResult { + /** The authorizations in an ExpressRoute Port. */ + value?: ExpressRoutePortAuthorization[]; + /** The URL to get the next set of results. */ + nextLink?: string; +} + /** ThreatIntel Whitelist for Firewall Policy. */ export interface FirewallPolicyThreatIntelWhitelist { /** List of IP addresses for the ThreatIntel Whitelist. */ @@ -1586,6 +1596,8 @@ export interface FirewallPolicyIntrusionDetectionConfiguration { signatureOverrides?: FirewallPolicyIntrusionDetectionSignatureSpecification[]; /** List of rules for traffic to bypass. */ bypassTrafficSettings?: FirewallPolicyIntrusionDetectionBypassTrafficSpecifications[]; + /** IDPS Private IP address ranges are used to identify traffic direction (i.e. inbound, outbound, etc.). By default, only ranges defined by IANA RFC 1918 are considered private IP addresses. To modify default ranges, specify your Private IP address ranges with this property */ + privateRanges?: string[]; } /** Intrusion detection signatures specification states. */ @@ -1691,7 +1703,7 @@ export interface OrderBy { /** Describes the actual column name to sort by */ field?: string; /** Describes if results should be in ascending/descending order */ - order?: OrderByOrder; + order?: FirewallPolicyIdpsQuerySortOrder; } /** Query result */ @@ -1706,11 +1718,11 @@ export interface SingleQueryResult { /** The ID of the signature */ signatureId?: number; /** The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny */ - mode?: SingleQueryResultMode; + mode?: FirewallPolicyIdpsSignatureMode; /** Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High */ - severity?: SingleQueryResultSeverity; + severity?: FirewallPolicyIdpsSignatureSeverity; /** Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - Bidirectional */ - direction?: SingleQueryResultDirection; + direction?: FirewallPolicyIdpsSignatureDirection; /** Describes the groups the signature belongs to */ group?: string; /** Describes what is the signature enforces */ @@ -4073,6 +4085,14 @@ export interface TunnelConnectionHealth { readonly lastConnectionEstablishedUtcTime?: string; } +/** GatewayCustomBgpIpAddressIpConfiguration for a virtual network gateway connection. */ +export interface GatewayCustomBgpIpAddressIpConfiguration { + /** The IpconfigurationId of ipconfiguration which belongs to gateway. */ + ipConfigurationId: string; + /** The custom BgpPeeringAddress which belongs to IpconfigurationId. */ + customBgpIpAddress: string; +} + /** An traffic selector policy for a virtual network gateway connection. */ export interface TrafficSelectorPolicy { /** A collection of local address spaces in CIDR format. */ @@ -4540,6 +4560,16 @@ export interface StaticRoute { nextHopIpAddress?: string; } +/** VpnServerConfiguration PolicyGroup member */ +export interface VpnServerConfigurationPolicyGroupMember { + /** Name of the VpnServerConfigurationPolicyGroupMember. */ + name?: string; + /** The Vpn Policy member attribute type. */ + attributeType?: VpnPolicyMemberAttributeType; + /** The value of Attribute used for this VpnServerConfigurationPolicyGroupMember. */ + attributeValue?: string; +} + /** VpnClientConnectionHealth properties. */ export interface VpnClientConnectionHealth { /** @@ -4566,6 +4596,14 @@ export interface ListVpnServerConfigurationsResult { nextLink?: string; } +/** Result of the request to list VpnServerConfigurationPolicyGroups. It contains a list of VpnServerConfigurationPolicyGroups and a URL nextLink to get the next set of results. */ +export interface ListVpnServerConfigurationPolicyGroupsResult { + /** List of VpnServerConfigurationPolicyGroups. */ + value?: VpnServerConfigurationPolicyGroup[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; +} + /** VirtualHub route table. */ export interface VirtualHubRouteTable { /** List of all routes. */ @@ -5305,6 +5343,8 @@ export type ApplicationGatewayProbe = SubResource & { unhealthyThreshold?: number; /** Whether the host header should be picked from the backend http settings. Default value is false. */ pickHostNameFromBackendHttpSettings?: boolean; + /** Whether the server name indication should be picked from the backend settings for Tls protocol. Default value is false. */ + pickHostNameFromBackendSettings?: boolean; /** Minimum number of servers that are always marked healthy. Default value is 0. */ minServers?: number; /** Criterion for classifying a healthy probe response. */ @@ -5837,6 +5877,8 @@ export type BackendAddressPool = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** Amount of seconds Load Balancer waits for before sending RESET to client and backend address. */ + drainPeriodInSeconds?: number; }; /** Inbound NAT rule of the load balancer. */ @@ -6007,6 +6049,41 @@ export type ApplicationGatewayBackendHttpSettings = SubResource & { readonly provisioningState?: ProvisioningState; }; +/** Backend address pool settings of an application gateway. */ +export type ApplicationGatewayBackendSettings = SubResource & { + /** Name of the backend settings that is unique within an Application Gateway. */ + name?: string; + /** + * 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; + /** + * Type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The destination port on the backend. */ + port?: number; + /** The protocol used to communicate with the backend. */ + protocol?: ApplicationGatewayProtocol; + /** Connection timeout in seconds. Application Gateway will fail the request if response is not received within ConnectionTimeout. Acceptable values are from 1 second to 86400 seconds. */ + timeout?: number; + /** Probe resource of an application gateway. */ + probe?: SubResource; + /** Array of references to application gateway trusted root certificates. */ + trustedRootCertificates?: SubResource[]; + /** Server name indication to be sent to the backend servers for Tls protocol. */ + hostName?: string; + /** Whether to pick server name indication from the host name of the backend server for Tls protocol. Default value is false. */ + pickHostNameFromBackendAddress?: boolean; + /** + * The provisioning state of the backend HTTP settings resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** Http listener of an application gateway. */ export type ApplicationGatewayHttpListener = SubResource & { /** Name of the HTTP listener that is unique within an Application Gateway. */ @@ -6048,6 +6125,37 @@ export type ApplicationGatewayHttpListener = SubResource & { hostNames?: string[]; }; +/** Listener of an application gateway. */ +export type ApplicationGatewayListener = SubResource & { + /** Name of the listener that is unique within an Application Gateway. */ + name?: string; + /** + * 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; + /** + * Type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Frontend IP configuration resource of an application gateway. */ + frontendIPConfiguration?: SubResource; + /** Frontend port resource of an application gateway. */ + frontendPort?: SubResource; + /** Protocol of the listener. */ + protocol?: ApplicationGatewayProtocol; + /** SSL certificate resource of an application gateway. */ + sslCertificate?: SubResource; + /** SSL profile resource of the application gateway. */ + sslProfile?: SubResource; + /** + * The provisioning state of the listener resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** SSL profile of an application gateway. */ export type ApplicationGatewaySslProfile = SubResource & { /** Name of the SSL profile that is unique within an Application Gateway. */ @@ -6182,6 +6290,35 @@ export type ApplicationGatewayRequestRoutingRule = SubResource & { readonly provisioningState?: ProvisioningState; }; +/** Routing rule of an application gateway. */ +export type ApplicationGatewayRoutingRule = SubResource & { + /** Name of the routing rule that is unique within an Application Gateway. */ + name?: string; + /** + * 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; + /** + * Type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Rule type. */ + ruleType?: ApplicationGatewayRequestRoutingRuleType; + /** Backend address pool resource of the application gateway. */ + backendAddressPool?: SubResource; + /** Backend settings resource of the application gateway. */ + backendSettings?: SubResource; + /** Listener resource of the application gateway. */ + listener?: SubResource; + /** + * The provisioning state of the request routing rule resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** Rewrite rule set of an application gateway. */ export type ApplicationGatewayRewriteRuleSet = SubResource & { /** Name of the rewrite rule set that is unique within an Application Gateway. */ @@ -6800,6 +6937,42 @@ export type ExpressRouteLink = SubResource & { macSecConfig?: ExpressRouteLinkMacSecConfig; }; +/** ExpressRoutePort Authorization resource definition. */ +export type ExpressRoutePortAuthorization = SubResource & { + /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** + * 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; + /** + * Type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The authorization key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly authorizationKey?: string; + /** + * The authorization use status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; + /** + * The reference to the ExpressRoute circuit resource using the authorization. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly circuitResourceUri?: string; + /** + * The provisioning state of the authorization resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** Rule Collection Group resource. */ export type FirewallPolicyRuleCollectionGroup = SubResource & { /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ @@ -7331,6 +7504,38 @@ export type VpnSiteLink = SubResource & { readonly provisioningState?: ProvisioningState; }; +/** VpnServerConfigurationPolicyGroup Resource. */ +export type VpnServerConfigurationPolicyGroup = SubResource & { + /** + * 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 resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Shows if this is a Default VpnServerConfigurationPolicyGroup or not. */ + isDefault?: boolean; + /** Priority for VpnServerConfigurationPolicyGroup. */ + priority?: number; + /** Multiple PolicyMembers for VpnServerConfigurationPolicyGroup. */ + policyMembers?: VpnServerConfigurationPolicyGroupMember[]; + /** + * List of references to P2SConnectionConfigurations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p2SConnectionConfigurations?: SubResource[]; + /** + * The provisioning state of the VpnServerConfigurationPolicyGroup resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** P2SConnectionConfiguration Resource. */ export type P2SConnectionConfiguration = SubResource & { /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ @@ -7346,6 +7551,16 @@ export type P2SConnectionConfiguration = SubResource & { routingConfiguration?: RoutingConfiguration; /** Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not. */ enableInternetSecurity?: boolean; + /** + * List of Configuration Policy Groups that this P2SConnectionConfiguration is attached to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly configurationPolicyGroupAssociations?: SubResource[]; + /** + * List of previous Configuration Policy Groups that this P2SConnectionConfiguration was attached to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly previousConfigurationPolicyGroupAssociations?: VpnServerConfigurationPolicyGroup[]; /** * The provisioning state of the P2SConnectionConfiguration resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -7442,6 +7657,8 @@ export type VpnSiteLinkConnection = SubResource & { sharedKey?: string; /** EnableBgp flag. */ enableBgp?: boolean; + /** vpnGatewayCustomBgpAddresses used by this connection. */ + vpnGatewayCustomBgpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; /** Enable policy-based traffic selectors. */ usePolicyBasedTrafficSelectors?: boolean; /** The IPSec Policies to be considered by this connection. */ @@ -7942,6 +8159,8 @@ export type NetworkInterface = Resource & { privateLinkService?: PrivateLinkService; /** Migration phase of Network Interface resource. */ migrationPhase?: NetworkInterfaceMigrationPhase; + /** Auxiliary mode of Network Interface resource. */ + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; }; /** A flow log resource. */ @@ -8239,14 +8458,20 @@ export type ApplicationGateway = Resource & { backendAddressPools?: ApplicationGatewayBackendAddressPool[]; /** Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ backendHttpSettingsCollection?: ApplicationGatewayBackendHttpSettings[]; + /** Backend settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + backendSettingsCollection?: ApplicationGatewayBackendSettings[]; /** Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ httpListeners?: ApplicationGatewayHttpListener[]; + /** Listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ + listeners?: ApplicationGatewayListener[]; /** SSL profiles of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ sslProfiles?: ApplicationGatewaySslProfile[]; /** URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ urlPathMaps?: ApplicationGatewayUrlPathMap[]; /** Request routing rules of the application gateway resource. */ requestRoutingRules?: ApplicationGatewayRequestRoutingRule[]; + /** Routing rules of the application gateway resource. */ + routingRules?: ApplicationGatewayRoutingRule[]; /** Rewrite rules for the application gateway resource. */ rewriteRuleSets?: ApplicationGatewayRewriteRuleSet[]; /** Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). */ @@ -8572,6 +8797,8 @@ export type ExpressRouteCircuit = Resource & { gatewayManagerEtag?: string; /** Flag denoting global reach status. */ globalReachEnabled?: boolean; + /** The authorizationKey. */ + authorizationKey?: string; }; /** A ExpressRouteResourceProvider object. */ @@ -9235,6 +9462,8 @@ export type VirtualNetworkGatewayConnectionListEntity = Resource & { peer?: SubResource; /** EnableBgp flag. */ enableBgp?: boolean; + /** GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. */ + gatewayCustomBgpIpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; /** Enable policy-based traffic selectors. */ usePolicyBasedTrafficSelectors?: boolean; /** The IPSec Policies to be considered by this connection. */ @@ -9337,6 +9566,8 @@ export type VirtualNetworkGatewayConnection = Resource & { peer?: SubResource; /** EnableBgp flag. */ enableBgp?: boolean; + /** GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. */ + gatewayCustomBgpIpAddresses?: GatewayCustomBgpIpAddressIpConfiguration[]; /** Use private local Azure IP for the connection. */ useLocalAzureIpAddress?: boolean; /** Enable policy-based traffic selectors. */ @@ -9527,6 +9758,8 @@ export type VpnServerConfiguration = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly p2SVpnGateways?: P2SVpnGateway[]; + /** List of all VpnServerConfigurationPolicyGroups. */ + configurationPolicyGroups?: VpnServerConfigurationPolicyGroup[]; /** * 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. @@ -9596,6 +9829,8 @@ export type VirtualHub = Resource & { allowBranchToBranchTraffic?: boolean; /** The preferred gateway to route on-prem traffic */ preferredRoutingGateway?: PreferredRoutingGateway; + /** The hubRoutingPreference of this VirtualHub. */ + hubRoutingPreference?: HubRoutingPreference; }; /** VpnGateway Resource. */ @@ -9640,11 +9875,8 @@ export type ExpressRouteGateway = Resource & { readonly etag?: string; /** Configuration for auto scaling. */ autoScaleConfiguration?: ExpressRouteGatewayPropertiesAutoScaleConfiguration; - /** - * List of ExpressRoute connections to the ExpressRoute gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expressRouteConnections?: ExpressRouteConnection[]; + /** List of ExpressRoute connections to the ExpressRoute gateway. */ + expressRouteConnections?: ExpressRouteConnection[]; /** * The provisioning state of the express route gateway resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -10044,7 +10276,9 @@ export type IPAllocationMethod = string; /** Known values of {@link ApplicationGatewayProtocol} that the service accepts. */ export enum KnownApplicationGatewayProtocol { Http = "Http", - Https = "Https" + Https = "Https", + Tcp = "Tcp", + Tls = "Tls" } /** @@ -10053,7 +10287,9 @@ export enum KnownApplicationGatewayProtocol { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Http** \ - * **Https** + * **Https** \ + * **Tcp** \ + * **Tls** */ export type ApplicationGatewayProtocol = string; @@ -10181,6 +10417,24 @@ export enum KnownNetworkInterfaceMigrationPhase { */ export type NetworkInterfaceMigrationPhase = string; +/** Known values of {@link NetworkInterfaceAuxiliaryMode} that the service accepts. */ +export enum KnownNetworkInterfaceAuxiliaryMode { + None = "None", + MaxConnections = "MaxConnections", + Floating = "Floating" +} + +/** + * Defines values for NetworkInterfaceAuxiliaryMode. \ + * {@link KnownNetworkInterfaceAuxiliaryMode} can be used interchangeably with NetworkInterfaceAuxiliaryMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **MaxConnections** \ + * **Floating** + */ +export type NetworkInterfaceAuxiliaryMode = string; + /** Known values of {@link FlowLogFormatType} that the service accepts. */ export enum KnownFlowLogFormatType { Json = "JSON" @@ -10385,6 +10639,26 @@ export enum KnownGatewayLoadBalancerTunnelInterfaceType { */ export type GatewayLoadBalancerTunnelInterfaceType = string; +/** Known values of {@link LoadBalancerBackendAddressAdminState} that the service accepts. */ +export enum KnownLoadBalancerBackendAddressAdminState { + None = "None", + Up = "Up", + Down = "Down", + Drain = "Drain" +} + +/** + * Defines values for LoadBalancerBackendAddressAdminState. \ + * {@link KnownLoadBalancerBackendAddressAdminState} can be used interchangeably with LoadBalancerBackendAddressAdminState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Up** \ + * **Down** \ + * **Drain** + */ +export type LoadBalancerBackendAddressAdminState = string; + /** Known values of {@link TransportProtocol} that the service accepts. */ export enum KnownTransportProtocol { Udp = "Udp", @@ -11017,6 +11291,22 @@ export enum KnownExpressRouteLinkMacSecSciState { */ export type ExpressRouteLinkMacSecSciState = string; +/** Known values of {@link ExpressRoutePortAuthorizationUseStatus} that the service accepts. */ +export enum KnownExpressRoutePortAuthorizationUseStatus { + Available = "Available", + InUse = "InUse" +} + +/** + * Defines values for ExpressRoutePortAuthorizationUseStatus. \ + * {@link KnownExpressRoutePortAuthorizationUseStatus} can be used interchangeably with ExpressRoutePortAuthorizationUseStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available** \ + * **InUse** + */ +export type ExpressRoutePortAuthorizationUseStatus = string; + /** Known values of {@link FirewallPolicyIntrusionDetectionStateType} that the service accepts. */ export enum KnownFirewallPolicyIntrusionDetectionStateType { Off = "Off", @@ -11089,75 +11379,21 @@ export enum KnownFirewallPolicyRuleCollectionType { */ export type FirewallPolicyRuleCollectionType = string; -/** Known values of {@link OrderByOrder} that the service accepts. */ -export enum KnownOrderByOrder { +/** Known values of {@link FirewallPolicyIdpsQuerySortOrder} that the service accepts. */ +export enum KnownFirewallPolicyIdpsQuerySortOrder { Ascending = "Ascending", Descending = "Descending" } /** - * Defines values for OrderByOrder. \ - * {@link KnownOrderByOrder} can be used interchangeably with OrderByOrder, + * Defines values for FirewallPolicyIdpsQuerySortOrder. \ + * {@link KnownFirewallPolicyIdpsQuerySortOrder} can be used interchangeably with FirewallPolicyIdpsQuerySortOrder, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Ascending** \ * **Descending** */ -export type OrderByOrder = string; - -/** Known values of {@link SingleQueryResultMode} that the service accepts. */ -export enum KnownSingleQueryResultMode { - Zero = 0, - One = 1, - Two = 2 -} - -/** - * Defines values for SingleQueryResultMode. \ - * {@link KnownSingleQueryResultMode} can be used interchangeably with SingleQueryResultMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **0** \ - * **1** \ - * **2** - */ -export type SingleQueryResultMode = number; - -/** Known values of {@link SingleQueryResultSeverity} that the service accepts. */ -export enum KnownSingleQueryResultSeverity { - One = 1, - Two = 2, - Three = 3 -} - -/** - * Defines values for SingleQueryResultSeverity. \ - * {@link KnownSingleQueryResultSeverity} can be used interchangeably with SingleQueryResultSeverity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **1** \ - * **2** \ - * **3** - */ -export type SingleQueryResultSeverity = number; - -/** Known values of {@link SingleQueryResultDirection} that the service accepts. */ -export enum KnownSingleQueryResultDirection { - Zero = 0, - One = 1, - Two = 2 -} - -/** - * Defines values for SingleQueryResultDirection. \ - * {@link KnownSingleQueryResultDirection} can be used interchangeably with SingleQueryResultDirection, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **0** \ - * **1** \ - * **2** - */ -export type SingleQueryResultDirection = number; +export type FirewallPolicyIdpsQuerySortOrder = string; /** Known values of {@link IpAllocationType} that the service accepts. */ export enum KnownIpAllocationType { @@ -12563,6 +12799,24 @@ export enum KnownVpnGatewayTunnelingProtocol { */ export type VpnGatewayTunnelingProtocol = string; +/** Known values of {@link VpnPolicyMemberAttributeType} that the service accepts. */ +export enum KnownVpnPolicyMemberAttributeType { + CertificateGroupId = "CertificateGroupId", + AADGroupId = "AADGroupId", + RadiusAzureGroupId = "RadiusAzureGroupId" +} + +/** + * Defines values for VpnPolicyMemberAttributeType. \ + * {@link KnownVpnPolicyMemberAttributeType} can be used interchangeably with VpnPolicyMemberAttributeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CertificateGroupId** \ + * **AADGroupId** \ + * **RadiusAzureGroupId** + */ +export type VpnPolicyMemberAttributeType = string; + /** Known values of {@link RoutingState} that the service accepts. */ export enum KnownRoutingState { None = "None", @@ -12601,6 +12855,24 @@ export enum KnownPreferredRoutingGateway { */ export type PreferredRoutingGateway = string; +/** Known values of {@link HubRoutingPreference} that the service accepts. */ +export enum KnownHubRoutingPreference { + ExpressRoute = "ExpressRoute", + VpnGateway = "VpnGateway", + ASPath = "ASPath" +} + +/** + * Defines values for HubRoutingPreference. \ + * {@link KnownHubRoutingPreference} can be used interchangeably with HubRoutingPreference, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ExpressRoute** \ + * **VpnGateway** \ + * **ASPath** + */ +export type HubRoutingPreference = string; + /** Known values of {@link VpnConnectionStatus} that the service accepts. */ export enum KnownVpnConnectionStatus { Unknown = "Unknown", @@ -13048,6 +13320,12 @@ export type ResourceIdentityType = | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; +/** Defines values for FirewallPolicyIdpsSignatureMode. */ +export type FirewallPolicyIdpsSignatureMode = 0 | 1 | 2; +/** Defines values for FirewallPolicyIdpsSignatureSeverity. */ +export type FirewallPolicyIdpsSignatureSeverity = 1 | 2 | 3; +/** Defines values for FirewallPolicyIdpsSignatureDirection. */ +export type FirewallPolicyIdpsSignatureDirection = 0 | 1 | 2; /** Optional parameters. */ export interface ApplicationGatewaysDeleteOptionalParams @@ -14763,6 +15041,48 @@ export interface ExpressRouteLinksListNextOptionalParams /** Contains response data for the listNext operation. */ export type ExpressRouteLinksListNextResponse = ExpressRouteLinkListResult; +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExpressRoutePortAuthorizationsGetResponse = ExpressRoutePortAuthorization; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ExpressRoutePortAuthorizationsCreateOrUpdateResponse = ExpressRoutePortAuthorization; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ExpressRoutePortAuthorizationsListResponse = ExpressRoutePortAuthorizationListResult; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ExpressRoutePortAuthorizationsListNextResponse = ExpressRoutePortAuthorizationListResult; + /** Optional parameters. */ export interface FirewallPoliciesDeleteOptionalParams extends coreClient.OperationOptions { @@ -14794,6 +15114,13 @@ export interface FirewallPoliciesCreateOrUpdateOptionalParams /** Contains response data for the createOrUpdate operation. */ export type FirewallPoliciesCreateOrUpdateResponse = FirewallPolicy; +/** Optional parameters. */ +export interface FirewallPoliciesUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type FirewallPoliciesUpdateTagsResponse = FirewallPolicy; + /** Optional parameters. */ export interface FirewallPoliciesListOptionalParams extends coreClient.OperationOptions {} @@ -18041,6 +18368,48 @@ export interface VpnServerConfigurationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type VpnServerConfigurationsListNextResponse = ListVpnServerConfigurationsResult; +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ConfigurationPolicyGroupsCreateOrUpdateResponse = VpnServerConfigurationPolicyGroup; + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConfigurationPolicyGroupsGetResponse = VpnServerConfigurationPolicyGroup; + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVpnServerConfiguration operation. */ +export type ConfigurationPolicyGroupsListByVpnServerConfigurationResponse = ListVpnServerConfigurationPolicyGroupsResult; + +/** Optional parameters. */ +export interface ConfigurationPolicyGroupsListByVpnServerConfigurationNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVpnServerConfigurationNext operation. */ +export type ConfigurationPolicyGroupsListByVpnServerConfigurationNextResponse = ListVpnServerConfigurationPolicyGroupsResult; + /** Optional parameters. */ export interface VirtualHubsGetOptionalParams extends coreClient.OperationOptions {} @@ -18950,6 +19319,8 @@ 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 0850c58d9d8b..6b8c680c284b 100644 --- a/sdk/network/arm-network/src/models/mappers.ts +++ b/sdk/network/arm-network/src/models/mappers.ts @@ -750,6 +750,12 @@ export const LoadBalancerBackendAddress: coreClient.CompositeMapper = { } } } + }, + adminState: { + serializedName: "properties.adminState", + type: { + name: "String" + } } } } @@ -4143,8 +4149,34 @@ export const GenerateExpressRoutePortsLOAResult: coreClient.CompositeMapper = { } }; +export const ExpressRoutePortAuthorizationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorizationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorization" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const FirewallPolicyThreatIntelWhitelist: coreClient.CompositeMapper = { - serializedName: "FirewallPolicyThreatIntelWhitelist", type: { name: "Composite", className: "FirewallPolicyThreatIntelWhitelist", @@ -4176,7 +4208,6 @@ export const FirewallPolicyThreatIntelWhitelist: coreClient.CompositeMapper = { }; export const FirewallPolicyInsights: coreClient.CompositeMapper = { - serializedName: "FirewallPolicyInsights", type: { name: "Composite", className: "FirewallPolicyInsights", @@ -4205,7 +4236,6 @@ export const FirewallPolicyInsights: coreClient.CompositeMapper = { }; export const FirewallPolicyLogAnalyticsResources: coreClient.CompositeMapper = { - serializedName: "FirewallPolicyLogAnalyticsResources", type: { name: "Composite", className: "FirewallPolicyLogAnalyticsResources", @@ -4234,7 +4264,6 @@ export const FirewallPolicyLogAnalyticsResources: coreClient.CompositeMapper = { }; export const FirewallPolicyLogAnalyticsWorkspace: coreClient.CompositeMapper = { - serializedName: "FirewallPolicyLogAnalyticsWorkspace", type: { name: "Composite", className: "FirewallPolicyLogAnalyticsWorkspace", @@ -4257,7 +4286,6 @@ export const FirewallPolicyLogAnalyticsWorkspace: coreClient.CompositeMapper = { }; export const FirewallPolicySnat: coreClient.CompositeMapper = { - serializedName: "FirewallPolicySNAT", type: { name: "Composite", className: "FirewallPolicySnat", @@ -4278,7 +4306,6 @@ export const FirewallPolicySnat: coreClient.CompositeMapper = { }; export const FirewallPolicySQL: coreClient.CompositeMapper = { - serializedName: "FirewallPolicySQL", type: { name: "Composite", className: "FirewallPolicySQL", @@ -4294,7 +4321,6 @@ export const FirewallPolicySQL: coreClient.CompositeMapper = { }; export const DnsSettings: coreClient.CompositeMapper = { - serializedName: "DnsSettings", type: { name: "Composite", className: "DnsSettings", @@ -4328,7 +4354,6 @@ export const DnsSettings: coreClient.CompositeMapper = { }; export const ExplicitProxySettings: coreClient.CompositeMapper = { - serializedName: "ExplicitProxySettings", type: { name: "Composite", className: "ExplicitProxySettings", @@ -4432,6 +4457,17 @@ export const FirewallPolicyIntrusionDetectionConfiguration: coreClient.Composite } } } + }, + privateRanges: { + serializedName: "privateRanges", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -4821,19 +4857,22 @@ export const SingleQueryResult: coreClient.CompositeMapper = { mode: { serializedName: "mode", type: { - name: "Number" + name: "Enum", + allowedValues: [0, 1, 2] } }, severity: { serializedName: "severity", type: { - name: "Number" + name: "Enum", + allowedValues: [1, 2, 3] } }, direction: { serializedName: "direction", type: { - name: "Number" + name: "Enum", + allowedValues: [0, 1, 2] } }, group: { @@ -11477,6 +11516,29 @@ export const TunnelConnectionHealth: coreClient.CompositeMapper = { } }; +export const GatewayCustomBgpIpAddressIpConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayCustomBgpIpAddressIpConfiguration", + modelProperties: { + ipConfigurationId: { + serializedName: "ipConfigurationId", + required: true, + type: { + name: "String" + } + }, + customBgpIpAddress: { + serializedName: "customBgpIpAddress", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const TrafficSelectorPolicy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -12665,6 +12727,33 @@ export const StaticRoute: coreClient.CompositeMapper = { } }; +export const VpnServerConfigurationPolicyGroupMember: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VpnServerConfigurationPolicyGroupMember", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + attributeType: { + serializedName: "attributeType", + type: { + name: "String" + } + }, + attributeValue: { + serializedName: "attributeValue", + type: { + name: "String" + } + } + } + } +}; + export const VpnClientConnectionHealth: coreClient.CompositeMapper = { type: { name: "Composite", @@ -12732,6 +12821,33 @@ export const ListVpnServerConfigurationsResult: coreClient.CompositeMapper = { } }; +export const ListVpnServerConfigurationPolicyGroupsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListVpnServerConfigurationPolicyGroupsResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VpnServerConfigurationPolicyGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const VirtualHubRouteTable: coreClient.CompositeMapper = { type: { name: "Composite", @@ -14745,6 +14861,12 @@ export const ApplicationGatewayProbe: coreClient.CompositeMapper = { name: "Boolean" } }, + pickHostNameFromBackendSettings: { + serializedName: "properties.pickHostNameFromBackendSettings", + type: { + name: "Boolean" + } + }, minServers: { serializedName: "properties.minServers", type: { @@ -16049,6 +16171,12 @@ export const BackendAddressPool: coreClient.CompositeMapper = { type: { name: "String" } + }, + drainPeriodInSeconds: { + serializedName: "properties.drainPeriodInSeconds", + type: { + name: "Number" + } } } } @@ -16500,6 +16628,92 @@ export const ApplicationGatewayBackendHttpSettings: coreClient.CompositeMapper = } }; +export const ApplicationGatewayBackendSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGatewayBackendSettings", + modelProperties: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + port: { + serializedName: "properties.port", + type: { + name: "Number" + } + }, + protocol: { + serializedName: "properties.protocol", + type: { + name: "String" + } + }, + timeout: { + serializedName: "properties.timeout", + type: { + name: "Number" + } + }, + probe: { + serializedName: "properties.probe", + type: { + name: "Composite", + className: "SubResource" + } + }, + trustedRootCertificates: { + serializedName: "properties.trustedRootCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + pickHostNameFromBackendAddress: { + serializedName: "properties.pickHostNameFromBackendAddress", + type: { + name: "Boolean" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ApplicationGatewayHttpListener: coreClient.CompositeMapper = { type: { name: "Composite", @@ -16613,10 +16827,10 @@ export const ApplicationGatewayHttpListener: coreClient.CompositeMapper = { } }; -export const ApplicationGatewaySslProfile: coreClient.CompositeMapper = { +export const ApplicationGatewayListener: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationGatewaySslProfile", + className: "ApplicationGatewayListener", modelProperties: { ...SubResource.type.modelProperties, name: { @@ -16639,30 +16853,38 @@ export const ApplicationGatewaySslProfile: coreClient.CompositeMapper = { name: "String" } }, - trustedClientCertificates: { - serializedName: "properties.trustedClientCertificates", + frontendIPConfiguration: { + serializedName: "properties.frontendIPConfiguration", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "Composite", + className: "SubResource" } }, - sslPolicy: { - serializedName: "properties.sslPolicy", + frontendPort: { + serializedName: "properties.frontendPort", type: { name: "Composite", - className: "ApplicationGatewaySslPolicy" + className: "SubResource" } }, - clientAuthConfiguration: { - serializedName: "properties.clientAuthConfiguration", + protocol: { + serializedName: "properties.protocol", + type: { + name: "String" + } + }, + sslCertificate: { + serializedName: "properties.sslCertificate", type: { name: "Composite", - className: "ApplicationGatewayClientAuthConfiguration" + className: "SubResource" + } + }, + sslProfile: { + serializedName: "properties.sslProfile", + type: { + name: "Composite", + className: "SubResource" } }, provisioningState: { @@ -16676,10 +16898,10 @@ export const ApplicationGatewaySslProfile: coreClient.CompositeMapper = { } }; -export const ApplicationGatewayPathRule: coreClient.CompositeMapper = { +export const ApplicationGatewaySslProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationGatewayPathRule", + className: "ApplicationGatewaySslProfile", modelProperties: { ...SubResource.type.modelProperties, name: { @@ -16702,20 +16924,83 @@ export const ApplicationGatewayPathRule: coreClient.CompositeMapper = { name: "String" } }, - paths: { - serializedName: "properties.paths", + trustedClientCertificates: { + serializedName: "properties.trustedClientCertificates", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "SubResource" } } } }, - backendAddressPool: { - serializedName: "properties.backendAddressPool", - type: { + sslPolicy: { + serializedName: "properties.sslPolicy", + type: { + name: "Composite", + className: "ApplicationGatewaySslPolicy" + } + }, + clientAuthConfiguration: { + serializedName: "properties.clientAuthConfiguration", + type: { + name: "Composite", + className: "ApplicationGatewayClientAuthConfiguration" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationGatewayPathRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGatewayPathRule", + modelProperties: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + paths: { + serializedName: "properties.paths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + backendAddressPool: { + serializedName: "properties.backendAddressPool", + type: { name: "Composite", className: "SubResource" } @@ -16952,6 +17237,70 @@ export const ApplicationGatewayRequestRoutingRule: coreClient.CompositeMapper = } }; +export const ApplicationGatewayRoutingRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGatewayRoutingRule", + modelProperties: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + ruleType: { + serializedName: "properties.ruleType", + type: { + name: "String" + } + }, + backendAddressPool: { + serializedName: "properties.backendAddressPool", + type: { + name: "Composite", + className: "SubResource" + } + }, + backendSettings: { + serializedName: "properties.backendSettings", + type: { + name: "Composite", + className: "SubResource" + } + }, + listener: { + serializedName: "properties.listener", + type: { + name: "Composite", + className: "SubResource" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ApplicationGatewayRewriteRuleSet: coreClient.CompositeMapper = { type: { name: "Composite", @@ -18349,6 +18698,64 @@ export const ExpressRouteLink: coreClient.CompositeMapper = { } }; +export const ExpressRoutePortAuthorization: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorization", + modelProperties: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + authorizationKey: { + serializedName: "properties.authorizationKey", + readOnly: true, + type: { + name: "String" + } + }, + authorizationUseStatus: { + serializedName: "properties.authorizationUseStatus", + readOnly: true, + type: { + name: "String" + } + }, + circuitResourceUri: { + serializedName: "properties.circuitResourceUri", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const FirewallPolicyRuleCollectionGroup: coreClient.CompositeMapper = { type: { name: "Composite", @@ -19569,6 +19976,80 @@ export const VpnSiteLink: coreClient.CompositeMapper = { } }; +export const VpnServerConfigurationPolicyGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VpnServerConfigurationPolicyGroup", + modelProperties: { + ...SubResource.type.modelProperties, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + isDefault: { + serializedName: "properties.isDefault", + type: { + name: "Boolean" + } + }, + priority: { + serializedName: "properties.priority", + type: { + name: "Number" + } + }, + policyMembers: { + serializedName: "properties.policyMembers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VpnServerConfigurationPolicyGroupMember" + } + } + } + }, + p2SConnectionConfigurations: { + serializedName: "properties.p2SConnectionConfigurations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const P2SConnectionConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -19608,6 +20089,33 @@ export const P2SConnectionConfiguration: coreClient.CompositeMapper = { name: "Boolean" } }, + configurationPolicyGroupAssociations: { + serializedName: "properties.configurationPolicyGroupAssociations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + previousConfigurationPolicyGroupAssociations: { + serializedName: + "properties.previousConfigurationPolicyGroupAssociations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VpnServerConfigurationPolicyGroup" + } + } + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -19824,6 +20332,18 @@ export const VpnSiteLinkConnection: coreClient.CompositeMapper = { name: "Boolean" } }, + vpnGatewayCustomBgpAddresses: { + serializedName: "properties.vpnGatewayCustomBgpAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayCustomBgpIpAddressIpConfiguration" + } + } + } + }, usePolicyBasedTrafficSelectors: { serializedName: "properties.usePolicyBasedTrafficSelectors", type: { @@ -21047,6 +21567,12 @@ export const NetworkInterface: coreClient.CompositeMapper = { type: { name: "String" } + }, + auxiliaryMode: { + serializedName: "properties.auxiliaryMode", + type: { + name: "String" + } } } } @@ -21841,6 +22367,18 @@ export const ApplicationGateway: coreClient.CompositeMapper = { } } }, + backendSettingsCollection: { + serializedName: "properties.backendSettingsCollection", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationGatewayBackendSettings" + } + } + } + }, httpListeners: { serializedName: "properties.httpListeners", type: { @@ -21853,6 +22391,18 @@ export const ApplicationGateway: coreClient.CompositeMapper = { } } }, + listeners: { + serializedName: "properties.listeners", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationGatewayListener" + } + } + } + }, sslProfiles: { serializedName: "properties.sslProfiles", type: { @@ -21889,6 +22439,18 @@ export const ApplicationGateway: coreClient.CompositeMapper = { } } }, + routingRules: { + serializedName: "properties.routingRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationGatewayRoutingRule" + } + } + } + }, rewriteRuleSets: { serializedName: "properties.rewriteRuleSets", type: { @@ -22812,6 +23374,12 @@ export const ExpressRouteCircuit: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + authorizationKey: { + serializedName: "properties.authorizationKey", + type: { + name: "String" + } } } } @@ -24451,6 +25019,18 @@ export const VirtualNetworkGatewayConnectionListEntity: coreClient.CompositeMapp name: "Boolean" } }, + gatewayCustomBgpIpAddresses: { + serializedName: "properties.gatewayCustomBgpIpAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayCustomBgpIpAddressIpConfiguration" + } + } + } + }, usePolicyBasedTrafficSelectors: { serializedName: "properties.usePolicyBasedTrafficSelectors", type: { @@ -24710,6 +25290,18 @@ export const VirtualNetworkGatewayConnection: coreClient.CompositeMapper = { name: "Boolean" } }, + gatewayCustomBgpIpAddresses: { + serializedName: "properties.gatewayCustomBgpIpAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayCustomBgpIpAddressIpConfiguration" + } + } + } + }, useLocalAzureIpAddress: { serializedName: "properties.useLocalAzureIpAddress", type: { @@ -25244,6 +25836,18 @@ export const VpnServerConfiguration: coreClient.CompositeMapper = { } } }, + configurationPolicyGroups: { + serializedName: "properties.configurationPolicyGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VpnServerConfigurationPolicyGroup" + } + } + } + }, etagPropertiesEtag: { serializedName: "properties.etag", readOnly: true, @@ -25426,6 +26030,12 @@ export const VirtualHub: coreClient.CompositeMapper = { type: { name: "String" } + }, + hubRoutingPreference: { + serializedName: "properties.hubRoutingPreference", + type: { + name: "String" + } } } } @@ -25546,7 +26156,6 @@ export const ExpressRouteGateway: coreClient.CompositeMapper = { }, expressRouteConnections: { serializedName: "properties.expressRouteConnections", - readOnly: true, type: { name: "Sequence", element: { diff --git a/sdk/network/arm-network/src/models/parameters.ts b/sdk/network/arm-network/src/models/parameters.ts index 4f81f563b0d9..a3603e3291f1 100644 --- a/sdk/network/arm-network/src/models/parameters.ts +++ b/sdk/network/arm-network/src/models/parameters.ts @@ -36,6 +36,7 @@ import { ExpressRouteCrossConnectionPeering as ExpressRouteCrossConnectionPeeringMapper, ExpressRoutePort as ExpressRoutePortMapper, GenerateExpressRoutePortsLOARequest as GenerateExpressRoutePortsLOARequestMapper, + ExpressRoutePortAuthorization as ExpressRoutePortAuthorizationMapper, FirewallPolicy as FirewallPolicyMapper, FirewallPolicyRuleCollectionGroup as FirewallPolicyRuleCollectionGroupMapper, IdpsQueryObject as IdpsQueryObjectMapper, @@ -109,6 +110,7 @@ import { VpnSite as VpnSiteMapper, GetVpnSitesConfigurationRequest as GetVpnSitesConfigurationRequestMapper, VpnServerConfiguration as VpnServerConfigurationMapper, + VpnServerConfigurationPolicyGroup as VpnServerConfigurationPolicyGroupMapper, VirtualHub as VirtualHubMapper, EffectiveRoutesParameters as EffectiveRoutesParametersMapper, HubVirtualNetworkConnection as HubVirtualNetworkConnectionMapper, @@ -181,7 +183,7 @@ export const applicationGatewayName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-05-01", + defaultValue: "2021-08-01", isConstant: true, serializedName: "api-version", type: { @@ -459,18 +461,6 @@ 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: { @@ -695,6 +685,11 @@ export const linkName: OperationURLParameter = { } }; +export const authorizationParameters1: OperationParameter = { + parameterPath: "authorizationParameters", + mapper: ExpressRoutePortAuthorizationMapper +}; + export const firewallPolicyName: OperationURLParameter = { parameterPath: "firewallPolicyName", mapper: { @@ -1751,6 +1746,22 @@ export const vpnServerConfigurationParameters1: OperationParameter = { mapper: TagsObjectMapper }; +export const vpnServerConfigurationPolicyGroupParameters: OperationParameter = { + parameterPath: "vpnServerConfigurationPolicyGroupParameters", + mapper: VpnServerConfigurationPolicyGroupMapper +}; + +export const configurationPolicyGroupName: OperationURLParameter = { + parameterPath: "configurationPolicyGroupName", + mapper: { + serializedName: "configurationPolicyGroupName", + required: true, + type: { + name: "String" + } + } +}; + export const virtualHubName: OperationURLParameter = { parameterPath: "virtualHubName", mapper: { diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index 8cf2eef5e9f0..9d55e910bea8 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -7,7 +7,6 @@ */ import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; @@ -42,6 +41,7 @@ import { ExpressRoutePortsLocationsImpl, ExpressRoutePortsImpl, ExpressRouteLinksImpl, + ExpressRoutePortAuthorizationsImpl, FirewallPoliciesImpl, FirewallPolicyRuleCollectionGroupsImpl, FirewallPolicyIdpsSignaturesImpl, @@ -107,6 +107,7 @@ import { VpnSiteLinksImpl, VpnSitesConfigurationImpl, VpnServerConfigurationsImpl, + ConfigurationPolicyGroupsImpl, VirtualHubsImpl, HubVirtualNetworkConnectionsImpl, VpnGatewaysImpl, @@ -156,6 +157,7 @@ import { ExpressRoutePortsLocations, ExpressRoutePorts, ExpressRouteLinks, + ExpressRoutePortAuthorizations, FirewallPolicies, FirewallPolicyRuleCollectionGroups, FirewallPolicyIdpsSignatures, @@ -221,6 +223,7 @@ import { VpnSiteLinks, VpnSitesConfiguration, VpnServerConfigurations, + ConfigurationPolicyGroups, VirtualHubs, HubVirtualNetworkConnections, VpnGateways, @@ -278,6 +281,7 @@ import { /// export class NetworkManagementClient extends coreClient.ServiceClient { $host: string; + apiVersion: string; subscriptionId: string; /** @@ -308,7 +312,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-network/27.0.1`; + const packageDetails = `azsdk-js-arm-network/28.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -323,38 +327,15 @@ export class NetworkManagementClient extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix }, - baseUri: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + baseUri: options.endpoint || "https://management.azure.com" }; super(optionsWithDefaults); - - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName - ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } - } // Parameter assignments this.subscriptionId = subscriptionId; // 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 @@ -406,6 +387,9 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this.expressRoutePortsLocations = new ExpressRoutePortsLocationsImpl(this); this.expressRoutePorts = new ExpressRoutePortsImpl(this); this.expressRouteLinks = new ExpressRouteLinksImpl(this); + this.expressRoutePortAuthorizations = new ExpressRoutePortAuthorizationsImpl( + this + ); this.firewallPolicies = new FirewallPoliciesImpl(this); this.firewallPolicyRuleCollectionGroups = new FirewallPolicyRuleCollectionGroupsImpl( this @@ -505,6 +489,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this.vpnSiteLinks = new VpnSiteLinksImpl(this); this.vpnSitesConfiguration = new VpnSitesConfigurationImpl(this); this.vpnServerConfigurations = new VpnServerConfigurationsImpl(this); + this.configurationPolicyGroups = new ConfigurationPolicyGroupsImpl(this); this.virtualHubs = new VirtualHubsImpl(this); this.hubVirtualNetworkConnections = new HubVirtualNetworkConnectionsImpl( this @@ -906,13 +891,11 @@ export class NetworkManagementClient extends coreClient.ServiceClient { { resourceGroupName, bastionHostName, bslRequest, options }, putBastionShareableLinkOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -972,13 +955,11 @@ export class NetworkManagementClient extends coreClient.ServiceClient { { resourceGroupName, bastionHostName, bslRequest, options }, deleteBastionShareableLinkOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1082,13 +1063,11 @@ export class NetworkManagementClient extends coreClient.ServiceClient { { resourceGroupName, bastionHostName, options }, getActiveSessionsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1211,13 +1190,11 @@ export class NetworkManagementClient extends coreClient.ServiceClient { { resourceGroupName, virtualWANName, vpnClientParams, options }, generatevirtualwanvpnserverconfigurationvpnprofileOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1358,6 +1335,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { expressRoutePortsLocations: ExpressRoutePortsLocations; expressRoutePorts: ExpressRoutePorts; expressRouteLinks: ExpressRouteLinks; + expressRoutePortAuthorizations: ExpressRoutePortAuthorizations; firewallPolicies: FirewallPolicies; firewallPolicyRuleCollectionGroups: FirewallPolicyRuleCollectionGroups; firewallPolicyIdpsSignatures: FirewallPolicyIdpsSignatures; @@ -1423,6 +1401,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { vpnSiteLinks: VpnSiteLinks; vpnSitesConfiguration: VpnSitesConfiguration; vpnServerConfigurations: VpnServerConfigurations; + configurationPolicyGroups: ConfigurationPolicyGroups; virtualHubs: VirtualHubs; hubVirtualNetworkConnections: HubVirtualNetworkConnections; vpnGateways: VpnGateways; diff --git a/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts b/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts index 482ba76e1d89..87af39b9b35e 100644 --- a/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts +++ b/sdk/network/arm-network/src/operations/applicationGatewayPrivateEndpointConnections.ts @@ -169,13 +169,11 @@ export class ApplicationGatewayPrivateEndpointConnectionsImpl { resourceGroupName, applicationGatewayName, connectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -273,13 +271,11 @@ export class ApplicationGatewayPrivateEndpointConnectionsImpl }, updateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/applicationGateways.ts b/sdk/network/arm-network/src/operations/applicationGateways.ts index c35179295b91..33d1da8e43ce 100644 --- a/sdk/network/arm-network/src/operations/applicationGateways.ts +++ b/sdk/network/arm-network/src/operations/applicationGateways.ts @@ -265,13 +265,11 @@ export class ApplicationGatewaysImpl implements ApplicationGateways { { resourceGroupName, applicationGatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -372,13 +370,11 @@ export class ApplicationGatewaysImpl implements ApplicationGateways { { resourceGroupName, applicationGatewayName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -502,13 +498,11 @@ export class ApplicationGatewaysImpl implements ApplicationGateways { { resourceGroupName, applicationGatewayName, options }, startOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -585,13 +579,11 @@ export class ApplicationGatewaysImpl implements ApplicationGateways { { resourceGroupName, applicationGatewayName, options }, stopOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -673,13 +665,11 @@ export class ApplicationGatewaysImpl implements ApplicationGateways { { resourceGroupName, applicationGatewayName, options }, backendHealthOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -764,13 +754,11 @@ export class ApplicationGatewaysImpl implements ApplicationGateways { { resourceGroupName, applicationGatewayName, probeRequest, options }, backendHealthOnDemandOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts b/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts index 1ed113d62369..439542ce27eb 100644 --- a/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts +++ b/sdk/network/arm-network/src/operations/applicationSecurityGroups.ts @@ -195,13 +195,11 @@ export class ApplicationSecurityGroupsImpl { resourceGroupName, applicationSecurityGroupName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -302,13 +300,11 @@ export class ApplicationSecurityGroupsImpl { resourceGroupName, applicationSecurityGroupName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/azureFirewalls.ts b/sdk/network/arm-network/src/operations/azureFirewalls.ts index bc0390138685..982545841b87 100644 --- a/sdk/network/arm-network/src/operations/azureFirewalls.ts +++ b/sdk/network/arm-network/src/operations/azureFirewalls.ts @@ -194,13 +194,11 @@ export class AzureFirewallsImpl implements AzureFirewalls { { resourceGroupName, azureFirewallName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class AzureFirewallsImpl implements AzureFirewalls { { resourceGroupName, azureFirewallName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -394,13 +390,11 @@ export class AzureFirewallsImpl implements AzureFirewalls { { resourceGroupName, azureFirewallName, parameters, options }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/bastionHosts.ts b/sdk/network/arm-network/src/operations/bastionHosts.ts index 925afbf051ac..d67ff0cbd99b 100644 --- a/sdk/network/arm-network/src/operations/bastionHosts.ts +++ b/sdk/network/arm-network/src/operations/bastionHosts.ts @@ -197,13 +197,11 @@ export class BastionHostsImpl implements BastionHosts { { resourceGroupName, bastionHostName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -304,13 +302,11 @@ export class BastionHostsImpl implements BastionHosts { { resourceGroupName, bastionHostName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -397,13 +393,11 @@ export class BastionHostsImpl implements BastionHosts { { resourceGroupName, bastionHostName, parameters, options }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/configurationPolicyGroups.ts b/sdk/network/arm-network/src/operations/configurationPolicyGroups.ts new file mode 100644 index 000000000000..2a1288ade4ce --- /dev/null +++ b/sdk/network/arm-network/src/operations/configurationPolicyGroups.ts @@ -0,0 +1,500 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ConfigurationPolicyGroups } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + VpnServerConfigurationPolicyGroup, + ConfigurationPolicyGroupsListByVpnServerConfigurationNextOptionalParams, + ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateResponse, + ConfigurationPolicyGroupsDeleteOptionalParams, + ConfigurationPolicyGroupsGetOptionalParams, + ConfigurationPolicyGroupsGetResponse, + ConfigurationPolicyGroupsListByVpnServerConfigurationResponse, + ConfigurationPolicyGroupsListByVpnServerConfigurationNextResponse +} from "../models"; + +/// +/** Class containing ConfigurationPolicyGroups operations. */ +export class ConfigurationPolicyGroupsImpl + implements ConfigurationPolicyGroups { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class ConfigurationPolicyGroups class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param options The options parameters. + */ + public listByVpnServerConfiguration( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByVpnServerConfigurationPagingAll( + resourceGroupName, + vpnServerConfigurationName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByVpnServerConfigurationPagingPage( + resourceGroupName, + vpnServerConfigurationName, + options + ); + } + }; + } + + private async *listByVpnServerConfigurationPagingPage( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + ): AsyncIterableIterator { + let result = await this._listByVpnServerConfiguration( + resourceGroupName, + vpnServerConfigurationName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByVpnServerConfigurationNext( + resourceGroupName, + vpnServerConfigurationName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByVpnServerConfigurationPagingAll( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByVpnServerConfigurationPagingPage( + resourceGroupName, + vpnServerConfigurationName, + options + )) { + yield* page; + } + } + + /** + * Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationPolicyGroupParameters Parameters supplied to create or update a + * VpnServerConfiguration PolicyGroup. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ConfigurationPolicyGroupsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + vpnServerConfigurationPolicyGroupParameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationPolicyGroupParameters Parameters supplied to create or update a + * VpnServerConfiguration PolicyGroup. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + vpnServerConfigurationPolicyGroupParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a ConfigurationPolicyGroup. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes a ConfigurationPolicyGroup. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves the details of a ConfigurationPolicyGroup. + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup being retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vpnServerConfigurationName, + configurationPolicyGroupName, + options + }, + getOperationSpec + ); + } + + /** + * Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param options The options parameters. + */ + private _listByVpnServerConfiguration( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vpnServerConfigurationName, options }, + listByVpnServerConfigurationOperationSpec + ); + } + + /** + * ListByVpnServerConfigurationNext + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param nextLink The nextLink from the previous successful call to the ListByVpnServerConfiguration + * method. + * @param options The options parameters. + */ + private _listByVpnServerConfigurationNext( + resourceGroupName: string, + vpnServerConfigurationName: string, + nextLink: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationNextOptionalParams + ): Promise< + ConfigurationPolicyGroupsListByVpnServerConfigurationNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, vpnServerConfigurationName, nextLink, options }, + listByVpnServerConfigurationNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VpnServerConfigurationPolicyGroup + }, + 201: { + bodyMapper: Mappers.VpnServerConfigurationPolicyGroup + }, + 202: { + bodyMapper: Mappers.VpnServerConfigurationPolicyGroup + }, + 204: { + bodyMapper: Mappers.VpnServerConfigurationPolicyGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.vpnServerConfigurationPolicyGroupParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vpnServerConfigurationName, + Parameters.configurationPolicyGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vpnServerConfigurationName, + Parameters.configurationPolicyGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VpnServerConfigurationPolicyGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vpnServerConfigurationName, + Parameters.configurationPolicyGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByVpnServerConfigurationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListVpnServerConfigurationPolicyGroupsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vpnServerConfigurationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByVpnServerConfigurationNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListVpnServerConfigurationPolicyGroupsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vpnServerConfigurationName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/network/arm-network/src/operations/connectionMonitors.ts b/sdk/network/arm-network/src/operations/connectionMonitors.ts index 39e8bd51b004..f47e021f1692 100644 --- a/sdk/network/arm-network/src/operations/connectionMonitors.ts +++ b/sdk/network/arm-network/src/operations/connectionMonitors.ts @@ -176,13 +176,11 @@ export class ConnectionMonitorsImpl implements ConnectionMonitors { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -286,13 +284,11 @@ export class ConnectionMonitorsImpl implements ConnectionMonitors { { resourceGroupName, networkWatcherName, connectionMonitorName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -401,13 +397,11 @@ export class ConnectionMonitorsImpl implements ConnectionMonitors { { resourceGroupName, networkWatcherName, connectionMonitorName, options }, stopOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -489,13 +483,11 @@ export class ConnectionMonitorsImpl implements ConnectionMonitors { { resourceGroupName, networkWatcherName, connectionMonitorName, options }, startOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -582,13 +574,11 @@ export class ConnectionMonitorsImpl implements ConnectionMonitors { { resourceGroupName, networkWatcherName, connectionMonitorName, options }, queryOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/customIPPrefixes.ts b/sdk/network/arm-network/src/operations/customIPPrefixes.ts index 437cb6076b35..a53d34a0c3cc 100644 --- a/sdk/network/arm-network/src/operations/customIPPrefixes.ts +++ b/sdk/network/arm-network/src/operations/customIPPrefixes.ts @@ -194,13 +194,11 @@ export class CustomIPPrefixesImpl implements CustomIPPrefixes { { resourceGroupName, customIpPrefixName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class CustomIPPrefixesImpl implements CustomIPPrefixes { { resourceGroupName, customIpPrefixName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts b/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts index 09575ca1a195..8b59013aa600 100644 --- a/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts +++ b/sdk/network/arm-network/src/operations/ddosCustomPolicies.ts @@ -92,13 +92,11 @@ export class DdosCustomPoliciesImpl implements DdosCustomPolicies { { resourceGroupName, ddosCustomPolicyName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -199,13 +197,11 @@ export class DdosCustomPoliciesImpl implements DdosCustomPolicies { { resourceGroupName, ddosCustomPolicyName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts b/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts index edb6a1a108b4..cbd287835f4b 100644 --- a/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts +++ b/sdk/network/arm-network/src/operations/ddosProtectionPlans.ts @@ -197,13 +197,11 @@ export class DdosProtectionPlansImpl implements DdosProtectionPlans { { resourceGroupName, ddosProtectionPlanName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -304,13 +302,11 @@ export class DdosProtectionPlansImpl implements DdosProtectionPlans { { resourceGroupName, ddosProtectionPlanName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts b/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts index 9000598445b0..f5b0716e95d7 100644 --- a/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts +++ b/sdk/network/arm-network/src/operations/dscpConfigurationOperations.ts @@ -199,13 +199,11 @@ export class DscpConfigurationOperationsImpl { resourceGroupName, dscpConfigurationName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -285,13 +283,11 @@ export class DscpConfigurationOperationsImpl { resourceGroupName, dscpConfigurationName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts b/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts index 65bc46671869..7db47afe08c7 100644 --- a/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts +++ b/sdk/network/arm-network/src/operations/expressRouteCircuitAuthorizations.ts @@ -157,13 +157,11 @@ export class ExpressRouteCircuitAuthorizationsImpl { resourceGroupName, circuitName, authorizationName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -280,13 +278,11 @@ export class ExpressRouteCircuitAuthorizationsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts b/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts index d295fd8565ef..c2d57d8263ad 100644 --- a/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts +++ b/sdk/network/arm-network/src/operations/expressRouteCircuitConnections.ts @@ -180,13 +180,11 @@ export class ExpressRouteCircuitConnectionsImpl { resourceGroupName, circuitName, peeringName, connectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -309,13 +307,11 @@ export class ExpressRouteCircuitConnectionsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts b/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts index fc1388605b6d..b7fb384d38e9 100644 --- a/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts +++ b/sdk/network/arm-network/src/operations/expressRouteCircuitPeerings.ts @@ -157,13 +157,11 @@ export class ExpressRouteCircuitPeeringsImpl { resourceGroupName, circuitName, peeringName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -278,13 +276,11 @@ export class ExpressRouteCircuitPeeringsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteCircuits.ts b/sdk/network/arm-network/src/operations/expressRouteCircuits.ts index 13f08a45597e..38be534b2b53 100644 --- a/sdk/network/arm-network/src/operations/expressRouteCircuits.ts +++ b/sdk/network/arm-network/src/operations/expressRouteCircuits.ts @@ -204,13 +204,11 @@ export class ExpressRouteCircuitsImpl implements ExpressRouteCircuits { { resourceGroupName, circuitName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -311,13 +309,11 @@ export class ExpressRouteCircuitsImpl implements ExpressRouteCircuits { { resourceGroupName, circuitName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -426,13 +422,11 @@ export class ExpressRouteCircuitsImpl implements ExpressRouteCircuits { { resourceGroupName, circuitName, peeringName, devicePath, options }, listArpTableOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -526,13 +520,11 @@ export class ExpressRouteCircuitsImpl implements ExpressRouteCircuits { { resourceGroupName, circuitName, peeringName, devicePath, options }, listRoutesTableOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -626,13 +618,11 @@ export class ExpressRouteCircuitsImpl implements ExpressRouteCircuits { { resourceGroupName, circuitName, peeringName, devicePath, options }, listRoutesTableSummaryOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteConnections.ts b/sdk/network/arm-network/src/operations/expressRouteConnections.ts index ce20c11f5785..3bf87625092c 100644 --- a/sdk/network/arm-network/src/operations/expressRouteConnections.ts +++ b/sdk/network/arm-network/src/operations/expressRouteConnections.ts @@ -107,13 +107,11 @@ export class ExpressRouteConnectionsImpl implements ExpressRouteConnections { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -218,13 +216,11 @@ export class ExpressRouteConnectionsImpl implements ExpressRouteConnections { { resourceGroupName, expressRouteGatewayName, connectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts b/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts index c19f69680df1..c6559e445987 100644 --- a/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts +++ b/sdk/network/arm-network/src/operations/expressRouteCrossConnectionPeerings.ts @@ -186,13 +186,11 @@ export class ExpressRouteCrossConnectionPeeringsImpl { resourceGroupName, crossConnectionName, peeringName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -309,13 +307,11 @@ export class ExpressRouteCrossConnectionPeeringsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts b/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts index 7f7e974f73c4..74d85c4661cd 100644 --- a/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts +++ b/sdk/network/arm-network/src/operations/expressRouteCrossConnections.ts @@ -252,13 +252,11 @@ export class ExpressRouteCrossConnectionsImpl { resourceGroupName, crossConnectionName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -378,13 +376,11 @@ export class ExpressRouteCrossConnectionsImpl }, listArpTableOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -485,13 +481,11 @@ export class ExpressRouteCrossConnectionsImpl }, listRoutesTableSummaryOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -590,13 +584,11 @@ export class ExpressRouteCrossConnectionsImpl }, listRoutesTableOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRouteGateways.ts b/sdk/network/arm-network/src/operations/expressRouteGateways.ts index 0b67ca5227f8..8b861a66123e 100644 --- a/sdk/network/arm-network/src/operations/expressRouteGateways.ts +++ b/sdk/network/arm-network/src/operations/expressRouteGateways.ts @@ -137,13 +137,11 @@ export class ExpressRouteGatewaysImpl implements ExpressRouteGateways { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -237,13 +235,11 @@ export class ExpressRouteGatewaysImpl implements ExpressRouteGateways { }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -342,13 +338,11 @@ export class ExpressRouteGatewaysImpl implements ExpressRouteGateways { { resourceGroupName, expressRouteGatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts b/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts new file mode 100644 index 000000000000..28bb1d7aa705 --- /dev/null +++ b/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts @@ -0,0 +1,487 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ExpressRoutePortAuthorizations } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationsListNextOptionalParams, + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, + ExpressRoutePortAuthorizationsGetResponse, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse, + ExpressRoutePortAuthorizationsListResponse, + ExpressRoutePortAuthorizationsListNextResponse +} from "../models"; + +/// +/** Class containing ExpressRoutePortAuthorizations operations. */ +export class ExpressRoutePortAuthorizationsImpl + implements ExpressRoutePortAuthorizations { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class ExpressRoutePortAuthorizations class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets all authorizations in an express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + expressRoutePortName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + expressRoutePortName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + expressRoutePortName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + expressRoutePortName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + expressRoutePortName, + options + )) { + yield* page; + } + } + + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, expressRoutePortName, authorizationName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + expressRoutePortName, + authorizationName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, expressRoutePortName, authorizationName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets all authorizations in an express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, expressRoutePortName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + expressRoutePortName: string, + nextLink: string, + options?: ExpressRoutePortAuthorizationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, expressRoutePortName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.authorizationName, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.authorizationName, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + 201: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + 202: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + 204: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.authorizationParameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.authorizationName, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorizationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorizationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/network/arm-network/src/operations/expressRoutePorts.ts b/sdk/network/arm-network/src/operations/expressRoutePorts.ts index 4ec44e6be8c0..d4079df5ae9e 100644 --- a/sdk/network/arm-network/src/operations/expressRoutePorts.ts +++ b/sdk/network/arm-network/src/operations/expressRoutePorts.ts @@ -200,13 +200,11 @@ export class ExpressRoutePortsImpl implements ExpressRoutePorts { { resourceGroupName, expressRoutePortName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -307,13 +305,11 @@ export class ExpressRoutePortsImpl implements ExpressRoutePorts { { resourceGroupName, expressRoutePortName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/firewallPolicies.ts b/sdk/network/arm-network/src/operations/firewallPolicies.ts index 001b3f8763a1..58ca01e7f3a7 100644 --- a/sdk/network/arm-network/src/operations/firewallPolicies.ts +++ b/sdk/network/arm-network/src/operations/firewallPolicies.ts @@ -25,6 +25,9 @@ import { FirewallPoliciesGetResponse, FirewallPoliciesCreateOrUpdateOptionalParams, FirewallPoliciesCreateOrUpdateResponse, + TagsObject, + FirewallPoliciesUpdateTagsOptionalParams, + FirewallPoliciesUpdateTagsResponse, FirewallPoliciesListResponse, FirewallPoliciesListAllResponse, FirewallPoliciesListNextResponse, @@ -191,13 +194,11 @@ export class FirewallPoliciesImpl implements FirewallPolicies { { resourceGroupName, firewallPolicyName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -298,13 +299,11 @@ export class FirewallPoliciesImpl implements FirewallPolicies { { resourceGroupName, firewallPolicyName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -329,6 +328,25 @@ export class FirewallPoliciesImpl implements FirewallPolicies { return poller.pollUntilDone(); } + /** + * Updates tags of a Azure Firewall Policy resource. + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to update Azure Firewall Policy tags. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + firewallPolicyName: string, + parameters: TagsObject, + options?: FirewallPoliciesUpdateTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallPolicyName, parameters, options }, + updateTagsOperationSpec + ); + } + /** * Lists all Firewall Policies in a resource group. * @param resourceGroupName The name of the resource group. @@ -467,6 +485,30 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.FirewallPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.firewallPolicyName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies", diff --git a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts index 75812bc4d274..1fd4d65faf52 100644 --- a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts +++ b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignatures.ts @@ -65,6 +65,7 @@ const listOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts index 22d5a1701935..177f613e982a 100644 --- a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts +++ b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesFilterValues.ts @@ -65,6 +65,7 @@ const listOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts index 546dedf4893a..3b54c928ae02 100644 --- a/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts +++ b/sdk/network/arm-network/src/operations/firewallPolicyIdpsSignaturesOverrides.ts @@ -124,6 +124,7 @@ const patchOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -147,6 +148,7 @@ const putOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -169,6 +171,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -190,6 +193,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts b/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts index 53968e272441..9ca1dd263501 100644 --- a/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts +++ b/sdk/network/arm-network/src/operations/firewallPolicyRuleCollectionGroups.ts @@ -174,13 +174,11 @@ export class FirewallPolicyRuleCollectionGroupsImpl }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -302,13 +300,11 @@ export class FirewallPolicyRuleCollectionGroupsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/flowLogs.ts b/sdk/network/arm-network/src/operations/flowLogs.ts index bda189d91f08..9ed84fcea63d 100644 --- a/sdk/network/arm-network/src/operations/flowLogs.ts +++ b/sdk/network/arm-network/src/operations/flowLogs.ts @@ -184,13 +184,11 @@ export class FlowLogsImpl implements FlowLogs { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -321,13 +319,11 @@ export class FlowLogsImpl implements FlowLogs { { resourceGroupName, networkWatcherName, flowLogName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/hubRouteTables.ts b/sdk/network/arm-network/src/operations/hubRouteTables.ts index c8c3b9e849a4..1f229d0ca8ca 100644 --- a/sdk/network/arm-network/src/operations/hubRouteTables.ts +++ b/sdk/network/arm-network/src/operations/hubRouteTables.ts @@ -169,13 +169,11 @@ export class HubRouteTablesImpl implements HubRouteTables { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -279,13 +277,11 @@ export class HubRouteTablesImpl implements HubRouteTables { { resourceGroupName, virtualHubName, routeTableName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts b/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts index cbad2b5c3a2f..8d5f0b42c7c9 100644 --- a/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts +++ b/sdk/network/arm-network/src/operations/hubVirtualNetworkConnections.ts @@ -171,13 +171,11 @@ export class HubVirtualNetworkConnectionsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -263,13 +261,11 @@ export class HubVirtualNetworkConnectionsImpl { resourceGroupName, virtualHubName, connectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/inboundNatRules.ts b/sdk/network/arm-network/src/operations/inboundNatRules.ts index 6158ba8e9ad2..fe16b3ce11cc 100644 --- a/sdk/network/arm-network/src/operations/inboundNatRules.ts +++ b/sdk/network/arm-network/src/operations/inboundNatRules.ts @@ -181,13 +181,11 @@ export class InboundNatRulesImpl implements InboundNatRules { { resourceGroupName, loadBalancerName, inboundNatRuleName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -302,13 +300,11 @@ export class InboundNatRulesImpl implements InboundNatRules { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts b/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts index 9f50fa277c10..0891cbd31468 100644 --- a/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts +++ b/sdk/network/arm-network/src/operations/inboundSecurityRuleOperations.ts @@ -103,13 +103,11 @@ export class InboundSecurityRuleOperationsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/index.ts b/sdk/network/arm-network/src/operations/index.ts index 19e1496111f9..75a18887f6c2 100644 --- a/sdk/network/arm-network/src/operations/index.ts +++ b/sdk/network/arm-network/src/operations/index.ts @@ -35,6 +35,7 @@ export * from "./expressRouteCrossConnectionPeerings"; export * from "./expressRoutePortsLocations"; export * from "./expressRoutePorts"; export * from "./expressRouteLinks"; +export * from "./expressRoutePortAuthorizations"; export * from "./firewallPolicies"; export * from "./firewallPolicyRuleCollectionGroups"; export * from "./firewallPolicyIdpsSignatures"; @@ -100,6 +101,7 @@ export * from "./vpnSites"; export * from "./vpnSiteLinks"; export * from "./vpnSitesConfiguration"; export * from "./vpnServerConfigurations"; +export * from "./configurationPolicyGroups"; export * from "./virtualHubs"; export * from "./hubVirtualNetworkConnections"; export * from "./vpnGateways"; diff --git a/sdk/network/arm-network/src/operations/ipAllocations.ts b/sdk/network/arm-network/src/operations/ipAllocations.ts index 091e9dee445b..b91ee660f7ef 100644 --- a/sdk/network/arm-network/src/operations/ipAllocations.ts +++ b/sdk/network/arm-network/src/operations/ipAllocations.ts @@ -197,13 +197,11 @@ export class IpAllocationsImpl implements IpAllocations { { resourceGroupName, ipAllocationName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -304,13 +302,11 @@ export class IpAllocationsImpl implements IpAllocations { { resourceGroupName, ipAllocationName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/ipGroups.ts b/sdk/network/arm-network/src/operations/ipGroups.ts index aa0cdd5ad483..2013d79440d8 100644 --- a/sdk/network/arm-network/src/operations/ipGroups.ts +++ b/sdk/network/arm-network/src/operations/ipGroups.ts @@ -221,13 +221,11 @@ export class IpGroupsImpl implements IpGroups { { resourceGroupName, ipGroupsName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -326,13 +324,11 @@ export class IpGroupsImpl implements IpGroups { { resourceGroupName, ipGroupsName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts b/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts index 4250585d8d88..ffb347031cf2 100644 --- a/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts +++ b/sdk/network/arm-network/src/operations/loadBalancerBackendAddressPools.ts @@ -215,13 +215,11 @@ export class LoadBalancerBackendAddressPoolsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -307,13 +305,11 @@ export class LoadBalancerBackendAddressPoolsImpl { resourceGroupName, loadBalancerName, backendAddressPoolName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/loadBalancers.ts b/sdk/network/arm-network/src/operations/loadBalancers.ts index 8433abb6ef55..3f1f15349627 100644 --- a/sdk/network/arm-network/src/operations/loadBalancers.ts +++ b/sdk/network/arm-network/src/operations/loadBalancers.ts @@ -199,13 +199,11 @@ export class LoadBalancersImpl implements LoadBalancers { { resourceGroupName, loadBalancerName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -306,13 +304,11 @@ export class LoadBalancersImpl implements LoadBalancers { { resourceGroupName, loadBalancerName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -436,13 +432,11 @@ export class LoadBalancersImpl implements LoadBalancers { { location, parameters, options }, swapPublicIpAddressesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -528,13 +522,11 @@ export class LoadBalancersImpl implements LoadBalancers { { groupName, loadBalancerName, backendPoolName, parameters, options }, listInboundNatRulePortMappingsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/localNetworkGateways.ts b/sdk/network/arm-network/src/operations/localNetworkGateways.ts index 6391bef34088..963f6a4428d9 100644 --- a/sdk/network/arm-network/src/operations/localNetworkGateways.ts +++ b/sdk/network/arm-network/src/operations/localNetworkGateways.ts @@ -155,13 +155,11 @@ export class LocalNetworkGatewaysImpl implements LocalNetworkGateways { { resourceGroupName, localNetworkGatewayName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -258,13 +256,11 @@ export class LocalNetworkGatewaysImpl implements LocalNetworkGateways { { resourceGroupName, localNetworkGatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/natGateways.ts b/sdk/network/arm-network/src/operations/natGateways.ts index ec8a9b8645f5..2764f4a7c999 100644 --- a/sdk/network/arm-network/src/operations/natGateways.ts +++ b/sdk/network/arm-network/src/operations/natGateways.ts @@ -194,13 +194,11 @@ export class NatGatewaysImpl implements NatGateways { { resourceGroupName, natGatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class NatGatewaysImpl implements NatGateways { { resourceGroupName, natGatewayName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/natRules.ts b/sdk/network/arm-network/src/operations/natRules.ts index e831c1e1cc66..ae04de08aa91 100644 --- a/sdk/network/arm-network/src/operations/natRules.ts +++ b/sdk/network/arm-network/src/operations/natRules.ts @@ -201,13 +201,11 @@ export class NatRulesImpl implements NatRules { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -293,13 +291,11 @@ export class NatRulesImpl implements NatRules { { resourceGroupName, gatewayName, natRuleName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts b/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts index f5f307607c3c..61b3d9208e38 100644 --- a/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts +++ b/sdk/network/arm-network/src/operations/networkInterfaceTapConfigurations.ts @@ -174,13 +174,11 @@ export class NetworkInterfaceTapConfigurationsImpl }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -302,13 +300,11 @@ export class NetworkInterfaceTapConfigurationsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/networkInterfaces.ts b/sdk/network/arm-network/src/operations/networkInterfaces.ts index fe05626965dc..365c9219cdbf 100644 --- a/sdk/network/arm-network/src/operations/networkInterfaces.ts +++ b/sdk/network/arm-network/src/operations/networkInterfaces.ts @@ -681,13 +681,11 @@ export class NetworkInterfacesImpl implements NetworkInterfaces { { resourceGroupName, networkInterfaceName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -788,13 +786,11 @@ export class NetworkInterfacesImpl implements NetworkInterfaces { { resourceGroupName, networkInterfaceName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -923,13 +919,11 @@ export class NetworkInterfacesImpl implements NetworkInterfaces { { resourceGroupName, networkInterfaceName, options }, getEffectiveRouteTableOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1013,13 +1007,11 @@ export class NetworkInterfacesImpl implements NetworkInterfaces { { resourceGroupName, networkInterfaceName, options }, listEffectiveNetworkSecurityGroupsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1629,7 +1621,7 @@ const listVirtualMachineScaleSetVMNetworkInterfacesOperationSpec: coreClient.Ope bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1652,7 +1644,7 @@ const listVirtualMachineScaleSetNetworkInterfacesOperationSpec: coreClient.Opera bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1674,7 +1666,7 @@ const getVirtualMachineScaleSetNetworkInterfaceOperationSpec: coreClient.Operati bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1698,7 +1690,7 @@ const listVirtualMachineScaleSetIpConfigurationsOperationSpec: coreClient.Operat bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1722,7 +1714,7 @@ const getVirtualMachineScaleSetIpConfigurationOperationSpec: coreClient.Operatio bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1832,7 +1824,7 @@ const listVirtualMachineScaleSetVMNetworkInterfacesNextOperationSpec: coreClient bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1855,7 +1847,7 @@ const listVirtualMachineScaleSetNetworkInterfacesNextOperationSpec: coreClient.O bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1877,7 +1869,7 @@ const listVirtualMachineScaleSetIpConfigurationsNextOperationSpec: coreClient.Op bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operations/networkProfiles.ts b/sdk/network/arm-network/src/operations/networkProfiles.ts index 5265e2470994..86bbbfd36eb5 100644 --- a/sdk/network/arm-network/src/operations/networkProfiles.ts +++ b/sdk/network/arm-network/src/operations/networkProfiles.ts @@ -194,13 +194,11 @@ export class NetworkProfilesImpl implements NetworkProfiles { { resourceGroupName, networkProfileName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/networkSecurityGroups.ts b/sdk/network/arm-network/src/operations/networkSecurityGroups.ts index d2efe16f1ea3..c7ac6a3af493 100644 --- a/sdk/network/arm-network/src/operations/networkSecurityGroups.ts +++ b/sdk/network/arm-network/src/operations/networkSecurityGroups.ts @@ -194,13 +194,11 @@ export class NetworkSecurityGroupsImpl implements NetworkSecurityGroups { { resourceGroupName, networkSecurityGroupName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class NetworkSecurityGroupsImpl implements NetworkSecurityGroups { { resourceGroupName, networkSecurityGroupName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts b/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts index 91eca3c65260..fd67a91d229f 100644 --- a/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts +++ b/sdk/network/arm-network/src/operations/networkVirtualAppliances.ts @@ -197,13 +197,11 @@ export class NetworkVirtualAppliancesImpl implements NetworkVirtualAppliances { { resourceGroupName, networkVirtualApplianceName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -323,13 +321,11 @@ export class NetworkVirtualAppliancesImpl implements NetworkVirtualAppliances { { resourceGroupName, networkVirtualApplianceName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/networkWatchers.ts b/sdk/network/arm-network/src/operations/networkWatchers.ts index 3df1caeac22b..cca56796e1e2 100644 --- a/sdk/network/arm-network/src/operations/networkWatchers.ts +++ b/sdk/network/arm-network/src/operations/networkWatchers.ts @@ -246,13 +246,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -399,13 +397,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, verifyIPFlowOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -492,13 +488,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getNextHopOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -585,13 +579,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getVMSecurityRulesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -678,13 +670,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getTroubleshootingOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -771,13 +761,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getTroubleshootingResultOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -864,13 +852,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, setFlowLogConfigurationOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -958,13 +944,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getFlowLogStatusOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1053,13 +1037,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, checkConnectivityOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1148,13 +1130,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getAzureReachabilityReportOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1243,13 +1223,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, listAvailableProvidersOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1343,13 +1321,11 @@ export class NetworkWatchersImpl implements NetworkWatchers { { resourceGroupName, networkWatcherName, parameters, options }, getNetworkConfigurationDiagnosticOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/p2SVpnGateways.ts b/sdk/network/arm-network/src/operations/p2SVpnGateways.ts index d0b2f215f99c..cdc268e6c01d 100644 --- a/sdk/network/arm-network/src/operations/p2SVpnGateways.ts +++ b/sdk/network/arm-network/src/operations/p2SVpnGateways.ts @@ -234,13 +234,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, p2SVpnGatewayParameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -328,13 +326,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, p2SVpnGatewayParameters, options }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -414,13 +410,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -527,13 +521,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, options }, resetOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -617,13 +609,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, parameters, options }, generateVpnProfileOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -709,13 +699,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, options }, getP2SVpnConnectionHealthOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -803,13 +791,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, gatewayName, request, options }, getP2SVpnConnectionHealthDetailedOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -892,13 +878,11 @@ export class P2SVpnGatewaysImpl implements P2SVpnGateways { { resourceGroupName, p2SVpnGatewayName, request, options }, disconnectP2SVpnConnectionsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/packetCaptures.ts b/sdk/network/arm-network/src/operations/packetCaptures.ts index 8a1aefe9e047..36faac9153e0 100644 --- a/sdk/network/arm-network/src/operations/packetCaptures.ts +++ b/sdk/network/arm-network/src/operations/packetCaptures.ts @@ -172,13 +172,11 @@ export class PacketCapturesImpl implements PacketCaptures { }, createOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -282,13 +280,11 @@ export class PacketCapturesImpl implements PacketCaptures { { resourceGroupName, networkWatcherName, packetCaptureName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -370,13 +366,11 @@ export class PacketCapturesImpl implements PacketCaptures { { resourceGroupName, networkWatcherName, packetCaptureName, options }, stopOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -463,13 +457,11 @@ export class PacketCapturesImpl implements PacketCaptures { { resourceGroupName, networkWatcherName, packetCaptureName, options }, getStatusOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts b/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts index 162d8bed3d2c..24878efa83bd 100644 --- a/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts +++ b/sdk/network/arm-network/src/operations/privateDnsZoneGroups.ts @@ -173,13 +173,11 @@ export class PrivateDnsZoneGroupsImpl implements PrivateDnsZoneGroups { }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -298,13 +296,11 @@ export class PrivateDnsZoneGroupsImpl implements PrivateDnsZoneGroups { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/privateEndpoints.ts b/sdk/network/arm-network/src/operations/privateEndpoints.ts index f8a72292f49c..af899a8b0b42 100644 --- a/sdk/network/arm-network/src/operations/privateEndpoints.ts +++ b/sdk/network/arm-network/src/operations/privateEndpoints.ts @@ -191,13 +191,11 @@ export class PrivateEndpointsImpl implements PrivateEndpoints { { resourceGroupName, privateEndpointName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -298,13 +296,11 @@ export class PrivateEndpointsImpl implements PrivateEndpoints { { resourceGroupName, privateEndpointName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/privateLinkServices.ts b/sdk/network/arm-network/src/operations/privateLinkServices.ts index b5dd86ba6625..92911c33f13d 100644 --- a/sdk/network/arm-network/src/operations/privateLinkServices.ts +++ b/sdk/network/arm-network/src/operations/privateLinkServices.ts @@ -421,13 +421,11 @@ export class PrivateLinkServicesImpl implements PrivateLinkServices { { resourceGroupName, serviceName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -528,13 +526,11 @@ export class PrivateLinkServicesImpl implements PrivateLinkServices { { resourceGroupName, serviceName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -685,13 +681,11 @@ export class PrivateLinkServicesImpl implements PrivateLinkServices { { resourceGroupName, serviceName, peConnectionName, options }, deletePrivateEndpointConnectionOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -795,13 +789,11 @@ export class PrivateLinkServicesImpl implements PrivateLinkServices { { location, parameters, options }, checkPrivateLinkServiceVisibilityOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -887,13 +879,11 @@ export class PrivateLinkServicesImpl implements PrivateLinkServices { { location, resourceGroupName, parameters, options }, checkPrivateLinkServiceVisibilityByResourceGroupOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/publicIPAddresses.ts b/sdk/network/arm-network/src/operations/publicIPAddresses.ts index 57b6cb10a861..877103520f45 100644 --- a/sdk/network/arm-network/src/operations/publicIPAddresses.ts +++ b/sdk/network/arm-network/src/operations/publicIPAddresses.ts @@ -637,13 +637,11 @@ export class PublicIPAddressesImpl implements PublicIPAddresses { { resourceGroupName, publicIpAddressName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -744,13 +742,11 @@ export class PublicIPAddressesImpl implements PublicIPAddresses { { resourceGroupName, publicIpAddressName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -1280,7 +1276,7 @@ const listVirtualMachineScaleSetPublicIPAddressesOperationSpec: coreClient.Opera bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1302,7 +1298,7 @@ const listVirtualMachineScaleSetVMPublicIPAddressesOperationSpec: coreClient.Ope bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1327,7 +1323,7 @@ const getVirtualMachineScaleSetPublicIPAddressOperationSpec: coreClient.Operatio bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.expand, Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1440,7 +1436,7 @@ const listVirtualMachineScaleSetPublicIPAddressesNextOperationSpec: coreClient.O bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1462,7 +1458,7 @@ const listVirtualMachineScaleSetVMPublicIPAddressesNextOperationSpec: coreClient bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/network/arm-network/src/operations/publicIPPrefixes.ts b/sdk/network/arm-network/src/operations/publicIPPrefixes.ts index 32a360407ca2..0242ba28fc35 100644 --- a/sdk/network/arm-network/src/operations/publicIPPrefixes.ts +++ b/sdk/network/arm-network/src/operations/publicIPPrefixes.ts @@ -194,13 +194,11 @@ export class PublicIPPrefixesImpl implements PublicIPPrefixes { { resourceGroupName, publicIpPrefixName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class PublicIPPrefixesImpl implements PublicIPPrefixes { { resourceGroupName, publicIpPrefixName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/routeFilterRules.ts b/sdk/network/arm-network/src/operations/routeFilterRules.ts index d46f01547ef6..19fc7db3cfb0 100644 --- a/sdk/network/arm-network/src/operations/routeFilterRules.ts +++ b/sdk/network/arm-network/src/operations/routeFilterRules.ts @@ -168,13 +168,11 @@ export class RouteFilterRulesImpl implements RouteFilterRules { { resourceGroupName, routeFilterName, ruleName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -289,13 +287,11 @@ export class RouteFilterRulesImpl implements RouteFilterRules { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/routeFilters.ts b/sdk/network/arm-network/src/operations/routeFilters.ts index c846dc755e16..0bc377528c39 100644 --- a/sdk/network/arm-network/src/operations/routeFilters.ts +++ b/sdk/network/arm-network/src/operations/routeFilters.ts @@ -197,13 +197,11 @@ export class RouteFiltersImpl implements RouteFilters { { resourceGroupName, routeFilterName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -304,13 +302,11 @@ export class RouteFiltersImpl implements RouteFilters { { resourceGroupName, routeFilterName, routeFilterParameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/routeTables.ts b/sdk/network/arm-network/src/operations/routeTables.ts index ce781769c86e..35e843899a03 100644 --- a/sdk/network/arm-network/src/operations/routeTables.ts +++ b/sdk/network/arm-network/src/operations/routeTables.ts @@ -194,13 +194,11 @@ export class RouteTablesImpl implements RouteTables { { resourceGroupName, routeTableName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class RouteTablesImpl implements RouteTables { { resourceGroupName, routeTableName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/routes.ts b/sdk/network/arm-network/src/operations/routes.ts index e2125f96ab61..a74e0a75cd3f 100644 --- a/sdk/network/arm-network/src/operations/routes.ts +++ b/sdk/network/arm-network/src/operations/routes.ts @@ -156,13 +156,11 @@ export class RoutesImpl implements Routes { { resourceGroupName, routeTableName, routeName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -276,13 +274,11 @@ export class RoutesImpl implements Routes { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/routingIntentOperations.ts b/sdk/network/arm-network/src/operations/routingIntentOperations.ts index 691e20e02e56..7d2abaadf401 100644 --- a/sdk/network/arm-network/src/operations/routingIntentOperations.ts +++ b/sdk/network/arm-network/src/operations/routingIntentOperations.ts @@ -169,13 +169,11 @@ export class RoutingIntentOperationsImpl implements RoutingIntentOperations { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -279,13 +277,11 @@ export class RoutingIntentOperationsImpl implements RoutingIntentOperations { { resourceGroupName, virtualHubName, routingIntentName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/securityPartnerProviders.ts b/sdk/network/arm-network/src/operations/securityPartnerProviders.ts index 04ccdb46b8d0..e9707995174b 100644 --- a/sdk/network/arm-network/src/operations/securityPartnerProviders.ts +++ b/sdk/network/arm-network/src/operations/securityPartnerProviders.ts @@ -197,13 +197,11 @@ export class SecurityPartnerProvidersImpl implements SecurityPartnerProviders { { resourceGroupName, securityPartnerProviderName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -304,13 +302,11 @@ export class SecurityPartnerProvidersImpl implements SecurityPartnerProviders { { resourceGroupName, securityPartnerProviderName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/securityRules.ts b/sdk/network/arm-network/src/operations/securityRules.ts index aaed57b010cf..cc23fcf15505 100644 --- a/sdk/network/arm-network/src/operations/securityRules.ts +++ b/sdk/network/arm-network/src/operations/securityRules.ts @@ -173,13 +173,11 @@ export class SecurityRulesImpl implements SecurityRules { }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -299,13 +297,11 @@ export class SecurityRulesImpl implements SecurityRules { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts b/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts index 1eab047fd1df..e9b291a2b7c3 100644 --- a/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts +++ b/sdk/network/arm-network/src/operations/serviceEndpointPolicies.ts @@ -197,13 +197,11 @@ export class ServiceEndpointPoliciesImpl implements ServiceEndpointPolicies { { resourceGroupName, serviceEndpointPolicyName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -304,13 +302,11 @@ export class ServiceEndpointPoliciesImpl implements ServiceEndpointPolicies { { resourceGroupName, serviceEndpointPolicyName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts b/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts index 043a3bc9e3f2..a5353956aa34 100644 --- a/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts +++ b/sdk/network/arm-network/src/operations/serviceEndpointPolicyDefinitions.ts @@ -174,13 +174,11 @@ export class ServiceEndpointPolicyDefinitionsImpl }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -302,13 +300,11 @@ export class ServiceEndpointPolicyDefinitionsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/subnets.ts b/sdk/network/arm-network/src/operations/subnets.ts index 7933bca6720d..6e29e8c22e7c 100644 --- a/sdk/network/arm-network/src/operations/subnets.ts +++ b/sdk/network/arm-network/src/operations/subnets.ts @@ -172,13 +172,11 @@ export class SubnetsImpl implements Subnets { { resourceGroupName, virtualNetworkName, subnetName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -292,13 +290,11 @@ export class SubnetsImpl implements Subnets { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -392,13 +388,11 @@ export class SubnetsImpl implements Subnets { }, prepareNetworkPoliciesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -493,13 +487,11 @@ export class SubnetsImpl implements Subnets { }, unprepareNetworkPoliciesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualApplianceSites.ts b/sdk/network/arm-network/src/operations/virtualApplianceSites.ts index fd1048914b60..ea5ca585170c 100644 --- a/sdk/network/arm-network/src/operations/virtualApplianceSites.ts +++ b/sdk/network/arm-network/src/operations/virtualApplianceSites.ts @@ -168,13 +168,11 @@ export class VirtualApplianceSitesImpl implements VirtualApplianceSites { { resourceGroupName, networkVirtualApplianceName, siteName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -289,13 +287,11 @@ export class VirtualApplianceSitesImpl implements VirtualApplianceSites { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts b/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts index ed9622531710..1e1ad150251d 100644 --- a/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts +++ b/sdk/network/arm-network/src/operations/virtualHubBgpConnection.ts @@ -124,13 +124,11 @@ export class VirtualHubBgpConnectionImpl implements VirtualHubBgpConnection { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -216,13 +214,11 @@ export class VirtualHubBgpConnectionImpl implements VirtualHubBgpConnection { { resourceGroupName, virtualHubName, connectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts b/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts index 35ef3da55274..8381526f4827 100644 --- a/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts +++ b/sdk/network/arm-network/src/operations/virtualHubBgpConnections.ts @@ -177,13 +177,11 @@ export class VirtualHubBgpConnectionsImpl implements VirtualHubBgpConnections { { resourceGroupName, hubName, connectionName, options }, listLearnedRoutesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -270,13 +268,11 @@ export class VirtualHubBgpConnectionsImpl implements VirtualHubBgpConnections { { resourceGroupName, hubName, connectionName, options }, listAdvertisedRoutesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts b/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts index 971aa835fd0c..5752965433a3 100644 --- a/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts +++ b/sdk/network/arm-network/src/operations/virtualHubIpConfiguration.ts @@ -184,13 +184,11 @@ export class VirtualHubIpConfigurationImpl { resourceGroupName, virtualHubName, ipConfigName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -276,13 +274,11 @@ export class VirtualHubIpConfigurationImpl { resourceGroupName, virtualHubName, ipConfigName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts b/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts index 81f8e10dc5d5..2f1af2879f9e 100644 --- a/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts +++ b/sdk/network/arm-network/src/operations/virtualHubRouteTableV2S.ts @@ -190,13 +190,11 @@ export class VirtualHubRouteTableV2SImpl implements VirtualHubRouteTableV2S { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -283,13 +281,11 @@ export class VirtualHubRouteTableV2SImpl implements VirtualHubRouteTableV2S { { resourceGroupName, virtualHubName, routeTableName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualHubs.ts b/sdk/network/arm-network/src/operations/virtualHubs.ts index bfb25a16077b..577a9c1cd06d 100644 --- a/sdk/network/arm-network/src/operations/virtualHubs.ts +++ b/sdk/network/arm-network/src/operations/virtualHubs.ts @@ -222,13 +222,11 @@ export class VirtualHubsImpl implements VirtualHubs { { resourceGroupName, virtualHubName, virtualHubParameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -327,13 +325,11 @@ export class VirtualHubsImpl implements VirtualHubs { { resourceGroupName, virtualHubName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -435,13 +431,11 @@ export class VirtualHubsImpl implements VirtualHubs { { resourceGroupName, virtualHubName, options }, getEffectiveVirtualHubRoutesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts b/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts index 559f32c6317a..1938d7d3cddd 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkGatewayConnections.ts @@ -181,13 +181,11 @@ export class VirtualNetworkGatewayConnectionsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -285,13 +283,11 @@ export class VirtualNetworkGatewayConnectionsImpl { resourceGroupName, virtualNetworkGatewayConnectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -380,13 +376,11 @@ export class VirtualNetworkGatewayConnectionsImpl }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -481,13 +475,11 @@ export class VirtualNetworkGatewayConnectionsImpl }, setSharedKeyOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -622,13 +614,11 @@ export class VirtualNetworkGatewayConnectionsImpl }, resetSharedKeyOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -719,13 +709,11 @@ export class VirtualNetworkGatewayConnectionsImpl { resourceGroupName, virtualNetworkGatewayConnectionName, options }, startPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -817,13 +805,11 @@ export class VirtualNetworkGatewayConnectionsImpl }, stopPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -910,13 +896,11 @@ export class VirtualNetworkGatewayConnectionsImpl { resourceGroupName, virtualNetworkGatewayConnectionName, options }, getIkeSasOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -994,13 +978,11 @@ export class VirtualNetworkGatewayConnectionsImpl { resourceGroupName, virtualNetworkGatewayConnectionName, options }, resetConnectionOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts b/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts index 34165bf30ef2..6f57c4879277 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkGatewayNatRules.ts @@ -202,13 +202,11 @@ export class VirtualNetworkGatewayNatRulesImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -294,13 +292,11 @@ export class VirtualNetworkGatewayNatRulesImpl { resourceGroupName, virtualNetworkGatewayName, natRuleName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts b/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts index 817d2a9b56aa..e3f1f94d6774 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkGateways.ts @@ -266,13 +266,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -369,13 +367,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -459,13 +455,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, parameters, options }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -582,13 +576,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, resetOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -665,13 +657,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, resetVpnClientSharedKeyOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -759,13 +749,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, parameters, options }, generatevpnclientpackageOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -856,13 +844,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, parameters, options }, generateVpnProfileOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -950,13 +936,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, getVpnProfilePackageUrlOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1039,13 +1023,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, getBgpPeerStatusOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1145,13 +1127,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, getLearnedRoutesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1237,13 +1217,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, peer, options }, getAdvertisedRoutesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1340,13 +1318,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { }, setVpnclientIpsecParametersOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1437,13 +1413,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, getVpnclientIpsecParametersOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1552,13 +1526,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, startPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1643,13 +1615,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, parameters, options }, stopPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1738,13 +1708,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, options }, getVpnclientConnectionHealthOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -1824,13 +1792,11 @@ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { { resourceGroupName, virtualNetworkGatewayName, request, options }, disconnectVirtualNetworkGatewayVpnConnectionsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts b/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts index b7d6e76153e9..2695a6194cd2 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkPeerings.ts @@ -173,13 +173,11 @@ export class VirtualNetworkPeeringsImpl implements VirtualNetworkPeerings { }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -299,13 +297,11 @@ export class VirtualNetworkPeeringsImpl implements VirtualNetworkPeerings { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts b/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts index 5ad53762b8ba..65446c3c8989 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworkTaps.ts @@ -197,13 +197,11 @@ export class VirtualNetworkTapsImpl implements VirtualNetworkTaps { { resourceGroupName, tapName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -300,13 +298,11 @@ export class VirtualNetworkTapsImpl implements VirtualNetworkTaps { { resourceGroupName, tapName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualNetworks.ts b/sdk/network/arm-network/src/operations/virtualNetworks.ts index c1c69320b801..48d310ed7db0 100644 --- a/sdk/network/arm-network/src/operations/virtualNetworks.ts +++ b/sdk/network/arm-network/src/operations/virtualNetworks.ts @@ -272,13 +272,11 @@ export class VirtualNetworksImpl implements VirtualNetworks { { resourceGroupName, virtualNetworkName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -379,13 +377,11 @@ export class VirtualNetworksImpl implements VirtualNetworks { { resourceGroupName, virtualNetworkName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts b/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts index 47dfb703792c..295d5e0dcdec 100644 --- a/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts +++ b/sdk/network/arm-network/src/operations/virtualRouterPeerings.ts @@ -168,13 +168,11 @@ export class VirtualRouterPeeringsImpl implements VirtualRouterPeerings { { resourceGroupName, virtualRouterName, peeringName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -288,13 +286,11 @@ export class VirtualRouterPeeringsImpl implements VirtualRouterPeerings { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualRouters.ts b/sdk/network/arm-network/src/operations/virtualRouters.ts index d48ccfb6f228..91ca152afb20 100644 --- a/sdk/network/arm-network/src/operations/virtualRouters.ts +++ b/sdk/network/arm-network/src/operations/virtualRouters.ts @@ -194,13 +194,11 @@ export class VirtualRoutersImpl implements VirtualRouters { { resourceGroupName, virtualRouterName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -301,13 +299,11 @@ export class VirtualRoutersImpl implements VirtualRouters { { resourceGroupName, virtualRouterName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/virtualWans.ts b/sdk/network/arm-network/src/operations/virtualWans.ts index 3b7674b622d9..8be4dc334813 100644 --- a/sdk/network/arm-network/src/operations/virtualWans.ts +++ b/sdk/network/arm-network/src/operations/virtualWans.ts @@ -221,13 +221,11 @@ export class VirtualWansImpl implements VirtualWans { { resourceGroupName, virtualWANName, wANParameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -326,13 +324,11 @@ export class VirtualWansImpl implements VirtualWans { { resourceGroupName, virtualWANName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnConnections.ts b/sdk/network/arm-network/src/operations/vpnConnections.ts index ad0e083414ee..8d49bdc4710d 100644 --- a/sdk/network/arm-network/src/operations/vpnConnections.ts +++ b/sdk/network/arm-network/src/operations/vpnConnections.ts @@ -205,13 +205,11 @@ export class VpnConnectionsImpl implements VpnConnections { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -297,13 +295,11 @@ export class VpnConnectionsImpl implements VpnConnections { { resourceGroupName, gatewayName, connectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -390,13 +386,11 @@ export class VpnConnectionsImpl implements VpnConnections { { resourceGroupName, gatewayName, vpnConnectionName, options }, startPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -483,13 +477,11 @@ export class VpnConnectionsImpl implements VpnConnections { { resourceGroupName, gatewayName, vpnConnectionName, options }, stopPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnGateways.ts b/sdk/network/arm-network/src/operations/vpnGateways.ts index 0828d388c206..f0f380672aaa 100644 --- a/sdk/network/arm-network/src/operations/vpnGateways.ts +++ b/sdk/network/arm-network/src/operations/vpnGateways.ts @@ -227,13 +227,11 @@ export class VpnGatewaysImpl implements VpnGateways { { resourceGroupName, gatewayName, vpnGatewayParameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -320,13 +318,11 @@ export class VpnGatewaysImpl implements VpnGateways { { resourceGroupName, gatewayName, vpnGatewayParameters, options }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -406,13 +402,11 @@ export class VpnGatewaysImpl implements VpnGateways { { resourceGroupName, gatewayName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -494,13 +488,11 @@ export class VpnGatewaysImpl implements VpnGateways { { resourceGroupName, gatewayName, options }, resetOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -582,13 +574,11 @@ export class VpnGatewaysImpl implements VpnGateways { { resourceGroupName, gatewayName, options }, startPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -670,13 +660,11 @@ export class VpnGatewaysImpl implements VpnGateways { { resourceGroupName, gatewayName, options }, stopPacketCaptureOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnLinkConnections.ts b/sdk/network/arm-network/src/operations/vpnLinkConnections.ts index 5b3ec5b5f05b..a9595e3f217d 100644 --- a/sdk/network/arm-network/src/operations/vpnLinkConnections.ts +++ b/sdk/network/arm-network/src/operations/vpnLinkConnections.ts @@ -183,13 +183,11 @@ export class VpnLinkConnectionsImpl implements VpnLinkConnections { }, resetConnectionOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -287,13 +285,11 @@ export class VpnLinkConnectionsImpl implements VpnLinkConnections { }, getIkeSasOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts b/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts index 6b9f1429e98c..5c75d81fd798 100644 --- a/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts +++ b/sdk/network/arm-network/src/operations/vpnServerConfigurations.ts @@ -228,13 +228,11 @@ export class VpnServerConfigurationsImpl implements VpnServerConfigurations { }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -340,13 +338,11 @@ export class VpnServerConfigurationsImpl implements VpnServerConfigurations { { resourceGroupName, vpnServerConfigurationName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts b/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts index 2afa457ff1ab..cc6fa41ee0d3 100644 --- a/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts +++ b/sdk/network/arm-network/src/operations/vpnServerConfigurationsAssociatedWithVirtualWan.ts @@ -93,13 +93,11 @@ export class VpnServerConfigurationsAssociatedWithVirtualWanImpl { resourceGroupName, virtualWANName, options }, listOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnSites.ts b/sdk/network/arm-network/src/operations/vpnSites.ts index 0317938b1261..ba0538175439 100644 --- a/sdk/network/arm-network/src/operations/vpnSites.ts +++ b/sdk/network/arm-network/src/operations/vpnSites.ts @@ -221,13 +221,11 @@ export class VpnSitesImpl implements VpnSites { { resourceGroupName, vpnSiteName, vpnSiteParameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "azure-async-operation" }); - await poller.poll(); - return poller; } /** @@ -326,13 +324,11 @@ export class VpnSitesImpl implements VpnSites { { resourceGroupName, vpnSiteName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts b/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts index 40951e575ce5..4716cf786e8e 100644 --- a/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts +++ b/sdk/network/arm-network/src/operations/vpnSitesConfiguration.ts @@ -87,13 +87,11 @@ export class VpnSitesConfigurationImpl implements VpnSitesConfiguration { { resourceGroupName, virtualWANName, request, options }, downloadOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts b/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts index 2b3ca81b0e30..c717893f7cd8 100644 --- a/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts +++ b/sdk/network/arm-network/src/operations/webApplicationFirewallPolicies.ts @@ -253,13 +253,11 @@ export class WebApplicationFirewallPoliciesImpl { resourceGroupName, policyName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** diff --git a/sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts b/sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts new file mode 100644 index 000000000000..537b4a9e71fe --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/configurationPolicyGroups.ts @@ -0,0 +1,111 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VpnServerConfigurationPolicyGroup, + ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateOptionalParams, + ConfigurationPolicyGroupsCreateOrUpdateResponse, + ConfigurationPolicyGroupsDeleteOptionalParams, + ConfigurationPolicyGroupsGetOptionalParams, + ConfigurationPolicyGroupsGetResponse +} from "../models"; + +/// +/** Interface representing a ConfigurationPolicyGroups. */ +export interface ConfigurationPolicyGroups { + /** + * Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param options The options parameters. + */ + listByVpnServerConfiguration( + resourceGroupName: string, + vpnServerConfigurationName: string, + options?: ConfigurationPolicyGroupsListByVpnServerConfigurationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationPolicyGroupParameters Parameters supplied to create or update a + * VpnServerConfiguration PolicyGroup. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ConfigurationPolicyGroupsCreateOrUpdateResponse + > + >; + /** + * Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationPolicyGroupParameters Parameters supplied to create or update a + * VpnServerConfiguration PolicyGroup. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + vpnServerConfigurationPolicyGroupParameters: VpnServerConfigurationPolicyGroup, + options?: ConfigurationPolicyGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a ConfigurationPolicyGroup. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a ConfigurationPolicyGroup. + * @param resourceGroupName The resource group name of the ConfigurationPolicyGroup. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsDeleteOptionalParams + ): Promise; + /** + * Retrieves the details of a ConfigurationPolicyGroup. + * @param resourceGroupName The resource group name of the VpnServerConfiguration. + * @param vpnServerConfigurationName The name of the VpnServerConfiguration. + * @param configurationPolicyGroupName The name of the ConfigurationPolicyGroup being retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vpnServerConfigurationName: string, + configurationPolicyGroupName: string, + options?: ConfigurationPolicyGroupsGetOptionalParams + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts new file mode 100644 index 000000000000..fc6032f6ff8e --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts @@ -0,0 +1,111 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, + ExpressRoutePortAuthorizationsGetResponse, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ExpressRoutePortAuthorizations. */ +export interface ExpressRoutePortAuthorizations { + /** + * Gets all authorizations in an express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise; + /** + * Gets the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsGetOptionalParams + ): Promise; + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse + > + >; + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts index 0037e047356e..bccb088a47a2 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/firewallPolicies.ts @@ -16,7 +16,10 @@ import { FirewallPoliciesGetOptionalParams, FirewallPoliciesGetResponse, FirewallPoliciesCreateOrUpdateOptionalParams, - FirewallPoliciesCreateOrUpdateResponse + FirewallPoliciesCreateOrUpdateResponse, + TagsObject, + FirewallPoliciesUpdateTagsOptionalParams, + FirewallPoliciesUpdateTagsResponse } from "../models"; /// @@ -102,4 +105,17 @@ export interface FirewallPolicies { parameters: FirewallPolicy, options?: FirewallPoliciesCreateOrUpdateOptionalParams ): Promise; + /** + * Updates tags of a Azure Firewall Policy resource. + * @param resourceGroupName The name of the resource group. + * @param firewallPolicyName The name of the Firewall Policy. + * @param parameters Parameters supplied to update Azure Firewall Policy tags. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + firewallPolicyName: string, + parameters: TagsObject, + options?: FirewallPoliciesUpdateTagsOptionalParams + ): Promise; } diff --git a/sdk/network/arm-network/src/operationsInterfaces/index.ts b/sdk/network/arm-network/src/operationsInterfaces/index.ts index 19e1496111f9..75a18887f6c2 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/index.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/index.ts @@ -35,6 +35,7 @@ export * from "./expressRouteCrossConnectionPeerings"; export * from "./expressRoutePortsLocations"; export * from "./expressRoutePorts"; export * from "./expressRouteLinks"; +export * from "./expressRoutePortAuthorizations"; export * from "./firewallPolicies"; export * from "./firewallPolicyRuleCollectionGroups"; export * from "./firewallPolicyIdpsSignatures"; @@ -100,6 +101,7 @@ export * from "./vpnSites"; export * from "./vpnSiteLinks"; export * from "./vpnSitesConfiguration"; export * from "./vpnServerConfigurations"; +export * from "./configurationPolicyGroups"; export * from "./virtualHubs"; export * from "./hubVirtualNetworkConnections"; export * from "./vpnGateways"; diff --git a/sdk/network/arm-network/test/sampleTest.ts b/sdk/network/arm-network/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/network/arm-network/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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 { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + 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" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + 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"